mirror of
https://github.com/Ryujinx/SDL.git
synced 2024-12-23 06:05:36 +00:00
Back out documentation changes in favor of https://github.com/libsdl-org/SDL/pull/4794
This commit is contained in:
parent
0dc57b0f08
commit
43da35b567
|
@ -801,8 +801,9 @@ extern DECLSPEC void SDLCALL SDL_FlushEvents(Uint32 minType, Uint32 maxType);
|
||||||
* As this function implicitly calls SDL_PumpEvents(), you can only call this
|
* As this function implicitly calls SDL_PumpEvents(), you can only call this
|
||||||
* function in the thread that set the video mode.
|
* function in the thread that set the video mode.
|
||||||
*
|
*
|
||||||
* SDL_PollEvent() is deprecated as some sensors and mice with extremely high
|
* SDL_PollEvent() is the favored way of receiving system events since it can
|
||||||
* update rates can generate events each time this function is called.
|
* be done from the main loop and does not suspend the main loop while waiting
|
||||||
|
* on an event to be posted.
|
||||||
*
|
*
|
||||||
* The common practice is to fully process the event queue once every frame,
|
* The common practice is to fully process the event queue once every frame,
|
||||||
* usually as a first step before updating the game's state:
|
* usually as a first step before updating the game's state:
|
||||||
|
@ -810,8 +811,7 @@ extern DECLSPEC void SDLCALL SDL_FlushEvents(Uint32 minType, Uint32 maxType);
|
||||||
* ```c
|
* ```c
|
||||||
* while (game_is_still_running) {
|
* while (game_is_still_running) {
|
||||||
* SDL_Event event;
|
* SDL_Event event;
|
||||||
* SDL_PumpEvents();
|
* while (SDL_PollEvent(&event)) { // poll until all events are handled!
|
||||||
* while (SDL_PeepEvents(&event, 1, SDL_GETEVENT, 0, SDL_LASTEVENT) == 1) {
|
|
||||||
* // decide what to do with this event.
|
* // decide what to do with this event.
|
||||||
* }
|
* }
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue