Folded SDL_WINDOW_FULLSCREEN_EXCLUSIVE and SDL_WINDOW_FULLSCREEN_DESKTOP into a single SDL_WINDOW_FULLSCREEN flag

The fullscreen video mode used by the window can be used to determine whether it's in exclusive fullscreen or fullscreen desktop mode.
This commit is contained in:
Sam Lantinga
2023-02-01 11:30:28 -08:00
parent 14338ab459
commit ac75fe9324
36 changed files with 184 additions and 250 deletions

View File

@@ -249,16 +249,11 @@ int video_createWindowVariousFlags(void *arg)
w = SDLTest_RandomIntegerInRange(320, 1024);
h = SDLTest_RandomIntegerInRange(320, 768);
for (fVariation = 0; fVariation < 14; fVariation++) {
for (fVariation = 1; fVariation < 14; fVariation++) {
switch (fVariation) {
default:
case 0:
flags = SDL_WINDOW_FULLSCREEN_EXCLUSIVE;
/* Skip - blanks screen; comment out next line to run test */
continue;
break;
case 1:
flags = SDL_WINDOW_FULLSCREEN_DESKTOP;
flags = SDL_WINDOW_FULLSCREEN;
/* Skip - blanks screen; comment out next line to run test */
continue;
break;
@@ -1630,7 +1625,7 @@ cleanup:
}
/**
* @brief Tests the functionality of the SDL_WINDOWPOS_CENTERED_DISPLAY along with SDL_WINDOW_FULLSCREEN_DESKTOP.
* @brief Tests the functionality of the SDL_WINDOWPOS_CENTERED_DISPLAY along with SDL_WINDOW_FULLSCREEN.
*
* Espeically useful when run on a multi-monitor system with different DPI scales per monitor,
* to test that the window size is maintained when moving between monitors.

View File

@@ -95,7 +95,7 @@ int main(int argc, char **argv)
SDL_bool done = SDL_FALSE;
SDL_Event event;
SDL_CreateWindow("Sensor Test", 0, 0, 0, 0, SDL_WINDOW_FULLSCREEN_DESKTOP);
SDL_CreateWindow("Sensor Test", 0, 0, 0, 0, SDL_WINDOW_FULLSCREEN);
while (!done) {
/* Update to get the current event state */
SDL_PumpEvents();

View File

@@ -87,7 +87,7 @@ draw_modes_menu(SDL_Window *window, SDL_Renderer *renderer, SDL_FRect viewport)
SDLTest_DrawString(renderer, x, y, text);
y += lineHeight;
SDL_strlcpy(text, "Press Ctrl+Enter to toggle SDL_WINDOW_FULLSCREEN_EXCLUSIVE", sizeof text);
SDL_strlcpy(text, "Press Ctrl+Enter to toggle SDL_WINDOW_FULLSCREEN", sizeof text);
SDL_SetRenderDrawColor(renderer, 255, 255, 255, 255);
SDLTest_DrawString(renderer, x, y, text);
y += lineHeight;