(HAVE_MENU not defined) Buildfixes

This commit is contained in:
twinaphex 2016-05-17 08:02:13 +02:00
parent 6c9715027f
commit 80ce237878
3 changed files with 19 additions and 1 deletions

View File

@ -453,7 +453,9 @@ static void config_set_defaults(void)
const char *def_camera = config_get_default_camera(); const char *def_camera = config_get_default_camera();
const char *def_location = config_get_default_location(); const char *def_location = config_get_default_location();
const char *def_record = config_get_default_record(); const char *def_record = config_get_default_record();
#ifdef HAVE_MENU
static bool first_initialized = true; static bool first_initialized = true;
#endif
if (def_camera) if (def_camera)
strlcpy(settings->camera.driver, strlcpy(settings->camera.driver,
@ -931,7 +933,9 @@ static void config_set_defaults(void)
else else
rarch_ctl(RARCH_CTL_UNSET_BLOCK_CONFIG_READ, NULL); rarch_ctl(RARCH_CTL_UNSET_BLOCK_CONFIG_READ, NULL);
#ifdef HAVE_MENU
first_initialized = false; first_initialized = false;
#endif
} }
#ifndef GLOBAL_CONFIG_DIR #ifndef GLOBAL_CONFIG_DIR
@ -1224,6 +1228,7 @@ static void config_file_dump_all(config_file_t *conf)
} }
#endif #endif
#ifdef HAVE_MENU
static void config_get_hex_base(config_file_t *conf, const char *key, unsigned *base) static void config_get_hex_base(config_file_t *conf, const char *key, unsigned *base)
{ {
unsigned tmp = 0; unsigned tmp = 0;
@ -1232,6 +1237,7 @@ static void config_get_hex_base(config_file_t *conf, const char *key, unsigned *
if (config_get_hex(conf, key, &tmp)) if (config_get_hex(conf, key, &tmp))
*base = tmp; *base = tmp;
} }
#endif
/** /**
* config_load: * config_load:

View File

@ -459,6 +459,7 @@ static void sdl_apply_state_changes(void *data)
(void)data; (void)data;
} }
#ifdef HAVE_MENU
static void sdl_set_texture_frame(void *data, const void *frame, bool rgb32, static void sdl_set_texture_frame(void *data, const void *frame, bool rgb32,
unsigned width, unsigned height, float alpha) unsigned width, unsigned height, float alpha)
{ {
@ -497,6 +498,7 @@ static void sdl_show_mouse(void *data, bool state)
SDL_ShowCursor(state); SDL_ShowCursor(state);
} }
#endif
static void sdl_grab_mouse_toggle(void *data) static void sdl_grab_mouse_toggle(void *data)
{ {
@ -521,10 +523,16 @@ static const video_poke_interface_t sdl_poke_interface = {
sdl_apply_state_changes, sdl_apply_state_changes,
#ifdef HAVE_MENU #ifdef HAVE_MENU
sdl_set_texture_frame, sdl_set_texture_frame,
sdl_set_texture_enable,
#endif #endif
#ifdef HAVE_MENU
sdl_set_texture_enable,
NULL, NULL,
sdl_show_mouse, sdl_show_mouse,
#else
NULL,
NULL,
NULL,
#endif
sdl_grab_mouse_toggle, sdl_grab_mouse_toggle,
NULL NULL
}; };

View File

@ -1914,7 +1914,11 @@ static bool command_event_cmd_exec(void *data)
content_info.argc = 0; content_info.argc = 0;
content_info.argv = NULL; content_info.argv = NULL;
content_info.args = NULL; content_info.args = NULL;
#ifdef HAVE_MENU
content_info.environ_get = menu_content_environment_get; content_info.environ_get = menu_content_environment_get;
#else
content_info.environ_get = NULL;
#endif
runloop_ctl(RUNLOOP_CTL_GET_CONTENT_PATH, &fullpath); runloop_ctl(RUNLOOP_CTL_GET_CONTENT_PATH, &fullpath);