We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This one's mostly for @TheSpydog who's currently exploring wasm, but also applies to @jfmajor who needs this feature for their editor.
Currently the loop is held entirely in the FNAPlatform function, but this is a problem for 2 reasons:
This is a proposed refactor, but could change depending on performance/accuracy issues we've not encountered yet:
FNAPlatform.RegisterGame
activeGames
FNAPlatform.UnregisterGame
FNAPlatform.PollEvents
OSXUseSpaces
List<Keys> keys
displayIndex
GraphicsAdapter
int
RunLoop
private void RunLoop() { while (RunApplication) { FNAPlatform.PollEvents( this, currentAdapter, textInputControlDown, textInputControlRepeat, ref textInputSuppress ); Tick(); } Exit(); } protected virtual void BeginRun() { if (loopBegan) { return; } currentAdapter = FNAPlatform.RegisterGame(this); Rectangle windowBounds = Window.ClientBounds; Mouse.INTERNAL_WindowWidth = windowBounds.Width; Mouse.INTERNAL_WindowHeight = windowBounds.Height; // Perform initial check for a touch device TouchPanel.TouchDeviceExists = GetTouchCapabilities().IsConnected; loopBegan = true; } protected virtual void EndRun() { if (loopBegan) { FNAPlatform.UnregisterGame(this); loopBegan = false; } }
The text was updated successfully, but these errors were encountered:
Fixed by #324
Sorry, something went wrong.
TheSpydog
No branches or pull requests
This one's mostly for @TheSpydog who's currently exploring wasm, but also applies to @jfmajor who needs this feature for their editor.
Currently the loop is held entirely in the FNAPlatform function, but this is a problem for 2 reasons:
This is a proposed refactor, but could change depending on performance/accuracy issues we've not encountered yet:
FNAPlatform.RegisterGame
shows the game window and adds it toactiveGames
FNAPlatform.UnregisterGame
removes the game fromactiveGames
FNAPlatform.PollEvents
contains the SDL_Event loop, add this to RunOneFrame()OSXUseSpaces
becomes a static readonly variableList<Keys> keys
is initialized in Keyboard.cs insteaddisplayIndex
becomes aGraphicsAdapter
rather than anint
RunLoop
that looks like this:The text was updated successfully, but these errors were encountered: