mirror of
https://github.com/libretro/RetroArch
synced 2025-03-02 19:13:34 +00:00
Move force_fullscreen to retroarch.c
This commit is contained in:
parent
04605f085c
commit
6c4557817d
@ -28,6 +28,7 @@
|
||||
#include "input/input_keymaps.h"
|
||||
#include "input/input_remapping.h"
|
||||
#include "general.h"
|
||||
#include "retroarch.h"
|
||||
#include "system.h"
|
||||
#include "verbosity.h"
|
||||
|
||||
@ -441,8 +442,7 @@ static void config_set_defaults(void)
|
||||
#endif
|
||||
settings->multimedia.builtin_imageviewer_enable = true;
|
||||
settings->video.scale = scale;
|
||||
settings->video.fullscreen = global->force_fullscreen
|
||||
? true : fullscreen;
|
||||
settings->video.fullscreen = rarch_ctl(RARCH_CTL_IS_FORCE_FULLSCREEN, NULL) ? true : fullscreen;
|
||||
settings->video.windowed_fullscreen = windowed_fullscreen;
|
||||
settings->video.monitor_index = monitor_index;
|
||||
settings->video.fullscreen_x = fullscreen_x;
|
||||
@ -1232,7 +1232,7 @@ static bool config_load_file(const char *path, bool set_defaults)
|
||||
CONFIG_GET_INT_BASE (conf, settings, video.fullscreen_x, "video_fullscreen_x");
|
||||
CONFIG_GET_INT_BASE (conf, settings, video.fullscreen_y, "video_fullscreen_y");
|
||||
|
||||
if (!global->force_fullscreen)
|
||||
if (!rarch_ctl(RARCH_CTL_IS_FORCE_FULLSCREEN, NULL))
|
||||
CONFIG_GET_BOOL_BASE(conf, settings, video.fullscreen, "video_fullscreen");
|
||||
|
||||
CONFIG_GET_BOOL_BASE(conf, settings, bundle_assets_extract_enable, "bundle_assets_extract_enable");
|
||||
|
10
retroarch.c
10
retroarch.c
@ -88,6 +88,7 @@ enum
|
||||
static char current_savestate_dir[PATH_MAX_LENGTH];
|
||||
static char current_savefile_dir[PATH_MAX_LENGTH];
|
||||
|
||||
static bool rarch_force_fullscreen;
|
||||
static bool error_on_init;
|
||||
static char error_string[PATH_MAX_LENGTH];
|
||||
static jmp_buf error_sjlj_context;
|
||||
@ -686,7 +687,7 @@ static void parse_input(int argc, char *argv[])
|
||||
break;
|
||||
|
||||
case 'f':
|
||||
global->force_fullscreen = true;
|
||||
rarch_ctl(RARCH_CTL_SET_FORCE_FULLSCREEN, NULL);
|
||||
break;
|
||||
|
||||
case 'S':
|
||||
@ -1041,6 +1042,8 @@ static bool init_state(void)
|
||||
video_driver_ctl(RARCH_DISPLAY_CTL_SET_ACTIVE, NULL);
|
||||
audio_driver_ctl(RARCH_AUDIO_CTL_SET_ACTIVE, NULL);
|
||||
|
||||
rarch_force_fullscreen = false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1329,6 +1332,11 @@ bool rarch_ctl(enum rarch_ctl_state state, void *data)
|
||||
|
||||
switch(state)
|
||||
{
|
||||
case RARCH_CTL_SET_FORCE_FULLSCREEN:
|
||||
rarch_force_fullscreen = true;
|
||||
break;
|
||||
case RARCH_CTL_IS_FORCE_FULLSCREEN:
|
||||
return rarch_force_fullscreen;
|
||||
case RARCH_CTL_REPLACE_CONFIG:
|
||||
{
|
||||
char *path = (char*)data;
|
||||
|
@ -93,7 +93,11 @@ enum rarch_ctl_state
|
||||
* but this will do for now. */
|
||||
RARCH_CTL_VALIDATE_CPU_FEATURES,
|
||||
|
||||
RARCH_CTL_FILL_PATHNAMES
|
||||
RARCH_CTL_FILL_PATHNAMES,
|
||||
|
||||
RARCH_CTL_SET_FORCE_FULLSCREEN,
|
||||
|
||||
RARCH_CTL_IS_FORCE_FULLSCREEN
|
||||
};
|
||||
|
||||
enum rarch_content_type
|
||||
|
Loading…
x
Reference in New Issue
Block a user