mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-24 08:15:50 +00:00
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:
@@ -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.
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user