mirror of
https://github.com/switchbrew/switch-examples.git
synced 2025-07-01 09:12:14 +02:00
sdl2: simplify display mode enumeration
This commit is contained in:
parent
6a8dc97951
commit
eb97e62afb
@ -93,9 +93,7 @@ int main(int argc, char *argv[])
|
|||||||
// list available display modes, for "educational purpose"
|
// list available display modes, for "educational purpose"
|
||||||
mode_count = SDL_GetNumDisplayModes(0);
|
mode_count = SDL_GetNumDisplayModes(0);
|
||||||
for (int i = 0; i < mode_count; i++) {
|
for (int i = 0; i < mode_count; i++) {
|
||||||
SDL_DisplayMode mode;
|
SDL_GetDisplayMode(0, i, &modes[i]);
|
||||||
SDL_GetDisplayMode(0, i, &mode);
|
|
||||||
modes[i] = mode;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// open CONTROLLER_PLAYER_1 and CONTROLLER_PLAYER_2
|
// open CONTROLLER_PLAYER_1 and CONTROLLER_PLAYER_2
|
||||||
|
Loading…
Reference in New Issue
Block a user