Now this keeps one FBO for each SDL_TEXTUREACCESS_TARGET texture, and doesn't
reuse it. We check if the FBO is "complete" once, at creation time, and
setting a render target merely has to bind the right FBO and never look back.
This simplifies the code and removes a guaranteed pipeline stall when setting
a new render target.
Fixes#15524.
CAudio::~CAudio() waited on MaoscBufferCopied(KErrAbort) to set
EStateDone, but that callback can never fire once the active scheduler
loop has exited, deadlocking every close.
- StopThread() before iStream->Stop() in ~CAudio()
- Force iState = EStateDone instead of waiting on a dead callback
- Add 5s timeout to AudioIsReady() poll in E32Main()
- Fix CleanupStack LIFO pop order (mainApp before gRenderer)
Some compositors may dispatch this too early, during the initial empty commit, when subsurfaces are attached to a toplevel window, but a buffer has yet to be committed to the parent surface. Don't set the frame callback until the initial empty commit is done, so it will be called when the actual parent surface frame is committed.
Implement DrawGeometry using a software scanline rasteriser that fills
triangles directly into the EColor4K framebuffer. Vertices are sorted by
Y, split into upper/lower halves and filled with per-scanline edge
interpolation. Colour is stepped incrementally across each span (one
division per span edge rather than per pixel) to avoid the cost of
emulated integer division on the ARM920T.
[N-Gage] Audio is now double buffered to avoid stuttering and glitches. Some audio platform specific variables were exposed through SDL_Hints. Same method was used to display FPS. N-gage functions to obtain the current buffer and screen pitch were added to the render.
Adds hints:
SDL_AUDIO_NGAGE_LATENCY
SDL_AUDIO_NGAGE_SCHEDULER_TICK
SDL_AUDIO_NGAGE_PROCESS_TICK
SDL_AUDIO_NGAGE_PROCESS_PRIORITY
SDL_RENDER_SHOW_FPS
Adds functions to get current buffer address and pitch:
void *NGAGE_GetBackbufferAddress(void);
int NGAGE_GetBackbufferPitch(void);
---------
Co-authored-by: Michael Fitzmayer <mail@michael-fitzmayer.de>
Co-authored-by: Eddy Jansson <eloj@users.noreply.github.com>
Some compositors send the frame callback as part of the initial configuration sequence, so the window may already be past the "waiting for frame" state. Ensure that the exposure event is always sent.
Under the right conditions, this extension can result is smoother resizing when rendering with OpenGL, however, it is known to cause problems in certain cases, such as when handling presentation externally.
Gate it behind a hint, and disable it by default. Developers can selectively enable it when they verify that they meet the criteria for using it, and that it behaves correctly in their apps/games.
If the cursor was created with a temporary surface that was pointing at external memory, then when the cursor is used it might be referencing memory that had already been freed.
This was added so that the new thread definitely has its threadid set, via
SDL_GetCurrentThreadID(), before SDL_CreatThread returns, but this broke
Emscripten, which can't wait on a newly-created thread, since the thread won't
start until a later mainloop iteration.
Now we have the creating thread set this id in SDL_SYS_CreateThread, where
platform-specific logic can figure out how to calculate the new thread's ID
from the parent thread, without using SDL_GetCurrentThreadID().
Fixes#15509.
Natural scrolling affects both axes, and the compositor may not send the vertical axis orientation if the frame has no vertical scroll motion, so purely horizontal events need to be flagged as inverted as well.
The code is using `controls.window` before checking if it isn't null.
I found this bug by accident when I tried to run `SDL_ShowSimpleMessageBox`.
It first tried using Wayland with `zenity`, but since I don't have `zenity`, it fallbacked to `X11_ShowMessageBoxImpl`.
For some reason it couldn't create a window, maybe something related to XWayland, so `controls.window` was `NULL`.