mirror of
https://github.com/libretro/RetroArch
synced 2025-01-18 13:23:40 +00:00
Add monitor selection option.
This commit is contained in:
parent
9208663c53
commit
f6d8902462
@ -157,6 +157,7 @@ static const float yscale = 3.0; // Real y res = base_size * yscale
|
||||
// Fullscreen
|
||||
static const bool fullscreen = false; // To start in Fullscreen or not.
|
||||
static const bool windowed_fullscreen = false; // To use windowed mode or not when going fullscreen.
|
||||
static const unsigned monitor_index = 0; // Which monitor to prefer. 0 is any monitor, 1 and up selects specific monitors, 1 being the first monitor.
|
||||
static const unsigned fullscreen_x = 0; // Fullscreen resolution. A value of 0 uses the desktop resolution.
|
||||
static const unsigned fullscreen_y = 0;
|
||||
|
||||
|
@ -83,6 +83,7 @@ struct settings
|
||||
float yscale;
|
||||
bool fullscreen;
|
||||
bool windowed_fullscreen;
|
||||
unsigned monitor_index;
|
||||
unsigned fullscreen_x;
|
||||
unsigned fullscreen_y;
|
||||
bool vsync;
|
||||
|
@ -260,6 +260,9 @@ static bool gfx_ctx_set_video_mode(
|
||||
}
|
||||
}
|
||||
|
||||
if (g_settings.video.monitor_index)
|
||||
g_screen = g_settings.video.monitor_index - 1;
|
||||
|
||||
int x_off = 0;
|
||||
int y_off = 0;
|
||||
#ifdef HAVE_XINERAMA
|
||||
|
@ -288,6 +288,9 @@ static bool gfx_ctx_set_video_mode(
|
||||
}
|
||||
}
|
||||
|
||||
if (g_settings.video.monitor_index)
|
||||
g_screen = g_settings.video.monitor_index - 1;
|
||||
|
||||
int x_off = 0;
|
||||
int y_off = 0;
|
||||
#ifdef HAVE_XINERAMA
|
||||
|
@ -57,6 +57,10 @@
|
||||
# If fullscreen, prefer using a windowed fullscreen mode.
|
||||
# video_windowed_fullscreen = false
|
||||
|
||||
# Which monitor to prefer. 0 (default) means no particular monitor is preferred, 1 and up (1 being first monitor),
|
||||
# suggests RetroArch to use that particular monitor.
|
||||
# video_monitor_index = 0
|
||||
|
||||
# Force 16-bit colors. Apparently some video cards in use today have troubles with 32-bit ...
|
||||
# video_force_16bit = false
|
||||
|
||||
|
@ -145,6 +145,7 @@ void config_set_defaults(void)
|
||||
g_settings.video.yscale = yscale;
|
||||
g_settings.video.fullscreen = g_extern.force_fullscreen ? true : fullscreen;
|
||||
g_settings.video.windowed_fullscreen = windowed_fullscreen;
|
||||
g_settings.video.monitor_index = monitor_index;
|
||||
g_settings.video.fullscreen_x = fullscreen_x;
|
||||
g_settings.video.fullscreen_y = fullscreen_y;
|
||||
g_settings.video.force_16bit = force_16bit;
|
||||
@ -372,6 +373,7 @@ bool config_load_file(const char *path)
|
||||
CONFIG_GET_BOOL(video.fullscreen, "video_fullscreen");
|
||||
|
||||
CONFIG_GET_BOOL(video.windowed_fullscreen, "video_windowed_fullscreen");
|
||||
CONFIG_GET_BOOL(video.monitor_index, "video_monitor_index");
|
||||
CONFIG_GET_BOOL(video.force_16bit, "video_force_16bit");
|
||||
CONFIG_GET_BOOL(video.disable_composition, "video_disable_composition");
|
||||
CONFIG_GET_BOOL(video.vsync, "video_vsync");
|
||||
|
Loading…
x
Reference in New Issue
Block a user