mirror of
https://github.com/libretro/RetroArch
synced 2025-04-01 04:20:27 +00:00
More explicit typecasts to bools
This commit is contained in:
parent
cb0653137f
commit
f51b49f213
@ -2621,10 +2621,10 @@ static void frontend_unix_watch_path_for_changes(struct string_list *list, int f
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
inotify_data = (inotify_data_t*)calloc(1, sizeof(*inotify_data));
|
inotify_data = (inotify_data_t*)calloc(1, sizeof(*inotify_data));
|
||||||
inotify_data->fd = fd;
|
inotify_data->fd = fd;
|
||||||
|
|
||||||
inotify_data->wd_list = int_vector_list_new();
|
inotify_data->wd_list = int_vector_list_new();
|
||||||
inotify_data->path_list = string_list_new();
|
inotify_data->path_list = string_list_new();
|
||||||
|
|
||||||
/* handle other flags here as new ones are added */
|
/* handle other flags here as new ones are added */
|
||||||
|
@ -388,7 +388,7 @@ static INT_PTR_COMPAT CALLBACK pick_core_proc(
|
|||||||
static BOOL CALLBACK win32_monitor_enum_proc(HMONITOR hMonitor,
|
static BOOL CALLBACK win32_monitor_enum_proc(HMONITOR hMonitor,
|
||||||
HDC hdcMonitor, LPRECT lprcMonitor, LPARAM dwData)
|
HDC hdcMonitor, LPRECT lprcMonitor, LPARAM dwData)
|
||||||
{
|
{
|
||||||
win32_common_state_t
|
win32_common_state_t
|
||||||
*g_win32 = (win32_common_state_t*)&win32_st;
|
*g_win32 = (win32_common_state_t*)&win32_st;
|
||||||
|
|
||||||
win32_monitor_all[g_win32->monitor_count++] = hMonitor;
|
win32_monitor_all[g_win32->monitor_count++] = hMonitor;
|
||||||
@ -442,7 +442,7 @@ void win32_monitor_info(void *data, void *hm_data, unsigned *mon_id)
|
|||||||
MONITORINFOEX *mon = (MONITORINFOEX*)data;
|
MONITORINFOEX *mon = (MONITORINFOEX*)data;
|
||||||
HMONITOR *hm_to_use = (HMONITOR*)hm_data;
|
HMONITOR *hm_to_use = (HMONITOR*)hm_data;
|
||||||
unsigned fs_monitor = settings->uints.video_monitor_index;
|
unsigned fs_monitor = settings->uints.video_monitor_index;
|
||||||
win32_common_state_t
|
win32_common_state_t
|
||||||
*g_win32 = (win32_common_state_t*)&win32_st;
|
*g_win32 = (win32_common_state_t*)&win32_st;
|
||||||
|
|
||||||
if (!win32_monitor_last)
|
if (!win32_monitor_last)
|
||||||
@ -899,16 +899,16 @@ static void win32_save_position(void)
|
|||||||
&& !(video_st_flags & VIDEO_FLAG_FORCE_FULLSCREEN)
|
&& !(video_st_flags & VIDEO_FLAG_FORCE_FULLSCREEN)
|
||||||
&& !(video_st_flags & VIDEO_FLAG_IS_SWITCHING_DISPLAY_MODE))
|
&& !(video_st_flags & VIDEO_FLAG_IS_SWITCHING_DISPLAY_MODE))
|
||||||
{
|
{
|
||||||
bool ui_menubar_enable = settings->bools.ui_menubar_enable;
|
bool ui_menubar_enable = settings->bools.ui_menubar_enable;
|
||||||
bool window_show_decor = settings->bools.video_window_show_decorations;
|
bool window_show_decor = settings->bools.video_window_show_decorations;
|
||||||
settings->uints.window_position_x = g_win32->pos_x;
|
settings->uints.window_position_x = g_win32->pos_x;
|
||||||
settings->uints.window_position_y = g_win32->pos_y;
|
settings->uints.window_position_y = g_win32->pos_y;
|
||||||
settings->uints.window_position_width = g_win32->pos_width;
|
settings->uints.window_position_width = g_win32->pos_width;
|
||||||
settings->uints.window_position_height = g_win32->pos_height;
|
settings->uints.window_position_height = g_win32->pos_height;
|
||||||
if (window_show_decor)
|
if (window_show_decor)
|
||||||
{
|
{
|
||||||
int border_thickness = GetSystemMetrics(SM_CXSIZEFRAME);
|
int border_thickness = GetSystemMetrics(SM_CXSIZEFRAME);
|
||||||
int title_bar_height = GetSystemMetrics(SM_CYCAPTION);
|
int title_bar_height = GetSystemMetrics(SM_CYCAPTION);
|
||||||
settings->uints.window_position_width -= border_thickness * 2;
|
settings->uints.window_position_width -= border_thickness * 2;
|
||||||
settings->uints.window_position_height -= border_thickness * 2;
|
settings->uints.window_position_height -= border_thickness * 2;
|
||||||
settings->uints.window_position_height -= title_bar_height;
|
settings->uints.window_position_height -= title_bar_height;
|
||||||
@ -1320,7 +1320,7 @@ static LRESULT CALLBACK wnd_proc_common_dinput_internal(HWND hwnd,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
ImmReleaseContext(hwnd, hIMC);
|
ImmReleaseContext(hwnd, hIMC);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case WM_KEYUP: /* Key released */
|
case WM_KEYUP: /* Key released */
|
||||||
@ -1375,7 +1375,7 @@ static LRESULT CALLBACK wnd_proc_common_dinput_internal(HWND hwnd,
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (
|
if (
|
||||||
wparam == VK_F10
|
wparam == VK_F10
|
||||||
|| wparam == VK_MENU
|
|| wparam == VK_MENU
|
||||||
|| wparam == VK_RSHIFT
|
|| wparam == VK_RSHIFT
|
||||||
)
|
)
|
||||||
@ -1661,7 +1661,7 @@ LRESULT CALLBACK wnd_proc_gdi_dinput(HWND hwnd, UINT message,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_TASKBAR
|
#ifdef HAVE_TASKBAR
|
||||||
if ( g_win32->taskbar_message
|
if ( g_win32->taskbar_message
|
||||||
&& message == g_win32->taskbar_message)
|
&& message == g_win32->taskbar_message)
|
||||||
g_win32_flags |= WIN32_CMN_FLAG_TASKBAR_CREATED;
|
g_win32_flags |= WIN32_CMN_FLAG_TASKBAR_CREATED;
|
||||||
#endif
|
#endif
|
||||||
@ -1704,7 +1704,7 @@ LRESULT CALLBACK wnd_proc_gdi_winraw(HWND hwnd, UINT message,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_TASKBAR
|
#ifdef HAVE_TASKBAR
|
||||||
if ( g_win32->taskbar_message
|
if ( g_win32->taskbar_message
|
||||||
&& message == g_win32->taskbar_message)
|
&& message == g_win32->taskbar_message)
|
||||||
g_win32_flags |= WIN32_CMN_FLAG_TASKBAR_CREATED;
|
g_win32_flags |= WIN32_CMN_FLAG_TASKBAR_CREATED;
|
||||||
#endif
|
#endif
|
||||||
@ -1746,7 +1746,7 @@ LRESULT CALLBACK wnd_proc_gdi_common(HWND hwnd, UINT message,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_TASKBAR
|
#ifdef HAVE_TASKBAR
|
||||||
if ( g_win32->taskbar_message
|
if ( g_win32->taskbar_message
|
||||||
&& message == g_win32->taskbar_message)
|
&& message == g_win32->taskbar_message)
|
||||||
g_win32_flags |= WIN32_CMN_FLAG_TASKBAR_CREATED;
|
g_win32_flags |= WIN32_CMN_FLAG_TASKBAR_CREATED;
|
||||||
#endif
|
#endif
|
||||||
@ -1803,7 +1803,7 @@ bool win32_window_create(void *data, unsigned style,
|
|||||||
window_accelerators = LoadAcceleratorsA(GetModuleHandleA(NULL), MAKEINTRESOURCE(IDR_ACCELERATOR1));
|
window_accelerators = LoadAcceleratorsA(GetModuleHandleA(NULL), MAKEINTRESOURCE(IDR_ACCELERATOR1));
|
||||||
|
|
||||||
#ifdef HAVE_TASKBAR
|
#ifdef HAVE_TASKBAR
|
||||||
g_win32->taskbar_message =
|
g_win32->taskbar_message =
|
||||||
RegisterWindowMessage("TaskbarButtonCreated");
|
RegisterWindowMessage("TaskbarButtonCreated");
|
||||||
|
|
||||||
memset(¬ification_filter, 0, sizeof(notification_filter));
|
memset(¬ification_filter, 0, sizeof(notification_filter));
|
||||||
@ -1893,7 +1893,7 @@ bool win32_get_metrics(void *data,
|
|||||||
void win32_monitor_init(void)
|
void win32_monitor_init(void)
|
||||||
{
|
{
|
||||||
#if !defined(_XBOX)
|
#if !defined(_XBOX)
|
||||||
win32_common_state_t
|
win32_common_state_t
|
||||||
*g_win32 = (win32_common_state_t*)&win32_st;
|
*g_win32 = (win32_common_state_t*)&win32_st;
|
||||||
g_win32->monitor_count = 0;
|
g_win32->monitor_count = 0;
|
||||||
EnumDisplayMonitors(NULL, NULL,
|
EnumDisplayMonitors(NULL, NULL,
|
||||||
@ -1918,7 +1918,7 @@ void win32_check_window(void *data,
|
|||||||
bool video_is_threaded = video_driver_is_threaded();
|
bool video_is_threaded = video_driver_is_threaded();
|
||||||
if (video_is_threaded)
|
if (video_is_threaded)
|
||||||
ui_companion_win32.application->process_events();
|
ui_companion_win32.application->process_events();
|
||||||
*quit = g_win32_flags & WIN32_CMN_FLAG_QUIT;
|
*quit = (g_win32_flags & WIN32_CMN_FLAG_QUIT) ? true : false;
|
||||||
|
|
||||||
if (g_win32_flags & WIN32_CMN_FLAG_RESIZED)
|
if (g_win32_flags & WIN32_CMN_FLAG_RESIZED)
|
||||||
{
|
{
|
||||||
@ -2040,7 +2040,7 @@ static unsigned int menu_id_to_meta_key(unsigned int menu_id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Given a short key (meta key), get its name as a string */
|
/* Given a short key (meta key), get its name as a string */
|
||||||
/* For single character results, may return same pointer
|
/* For single character results, may return same pointer
|
||||||
* with different data inside (modifying the old result) */
|
* with different data inside (modifying the old result) */
|
||||||
static const char *win32_meta_key_to_name(unsigned int meta_key)
|
static const char *win32_meta_key_to_name(unsigned int meta_key)
|
||||||
{
|
{
|
||||||
@ -2067,7 +2067,7 @@ static const char *win32_meta_key_to_name(unsigned int meta_key)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Replaces Menu Item text with localized menu text,
|
/* Replaces Menu Item text with localized menu text,
|
||||||
* and displays the current shortcut key */
|
* and displays the current shortcut key */
|
||||||
static void win32_localize_menu(HMENU menu)
|
static void win32_localize_menu(HMENU menu)
|
||||||
{
|
{
|
||||||
@ -2121,13 +2121,13 @@ static void win32_localize_menu(HMENU menu)
|
|||||||
/* specific replacements:
|
/* specific replacements:
|
||||||
Load Content = "Ctrl+O"
|
Load Content = "Ctrl+O"
|
||||||
Fullscreen = "Alt+Enter" */
|
Fullscreen = "Alt+Enter" */
|
||||||
if (label_enum ==
|
if (label_enum ==
|
||||||
MENU_ENUM_LABEL_VALUE_LOAD_CONTENT_LIST)
|
MENU_ENUM_LABEL_VALUE_LOAD_CONTENT_LIST)
|
||||||
{
|
{
|
||||||
meta_key_name = "Ctrl+O";
|
meta_key_name = "Ctrl+O";
|
||||||
len2 = STRLEN_CONST("Ctrl+O");
|
len2 = STRLEN_CONST("Ctrl+O");
|
||||||
}
|
}
|
||||||
else if (label_enum ==
|
else if (label_enum ==
|
||||||
MENU_ENUM_LABEL_VALUE_INPUT_META_FULLSCREEN_TOGGLE_KEY)
|
MENU_ENUM_LABEL_VALUE_INPUT_META_FULLSCREEN_TOGGLE_KEY)
|
||||||
{
|
{
|
||||||
meta_key_name = "Alt+Enter";
|
meta_key_name = "Alt+Enter";
|
||||||
@ -2327,7 +2327,7 @@ static bool win32_monitor_set_fullscreen(
|
|||||||
devmode.dmPelsHeight = height;
|
devmode.dmPelsHeight = height;
|
||||||
devmode.dmDisplayFrequency = refresh;
|
devmode.dmDisplayFrequency = refresh;
|
||||||
devmode.dmFields = DM_PELSWIDTH
|
devmode.dmFields = DM_PELSWIDTH
|
||||||
| DM_PELSHEIGHT
|
| DM_PELSHEIGHT
|
||||||
| DM_DISPLAYFREQUENCY;
|
| DM_DISPLAYFREQUENCY;
|
||||||
return win32_change_display_settings(dev_name, &devmode,
|
return win32_change_display_settings(dev_name, &devmode,
|
||||||
CDS_FULLSCREEN) == DISP_CHANGE_SUCCESSFUL;
|
CDS_FULLSCREEN) == DISP_CHANGE_SUCCESSFUL;
|
||||||
@ -2506,7 +2506,7 @@ bool win32_set_video_mode(void *data,
|
|||||||
|
|
||||||
/* Wait until context is created (or failed to do so ...).
|
/* Wait until context is created (or failed to do so ...).
|
||||||
* Please don't remove the (res = ) as GetMessage can return -1. */
|
* Please don't remove the (res = ) as GetMessage can return -1. */
|
||||||
while ( !(g_win32_flags & WIN32_CMN_FLAG_INITED)
|
while ( !(g_win32_flags & WIN32_CMN_FLAG_INITED)
|
||||||
&& !(g_win32_flags & WIN32_CMN_FLAG_QUIT)
|
&& !(g_win32_flags & WIN32_CMN_FLAG_QUIT)
|
||||||
&& (res = GetMessage(&msg, main_window.hwnd, 0, 0)) != 0)
|
&& (res = GetMessage(&msg, main_window.hwnd, 0, 0)) != 0)
|
||||||
{
|
{
|
||||||
@ -2540,7 +2540,7 @@ void win32_window_reset(void)
|
|||||||
void win32_destroy_window(void)
|
void win32_destroy_window(void)
|
||||||
{
|
{
|
||||||
#ifndef _XBOX
|
#ifndef _XBOX
|
||||||
UnregisterClass("RetroArch",
|
UnregisterClass("RetroArch",
|
||||||
GetModuleHandle(NULL));
|
GetModuleHandle(NULL));
|
||||||
#if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x500 /* 2K */
|
#if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x500 /* 2K */
|
||||||
UnregisterDeviceNotification(notification_handler);
|
UnregisterDeviceNotification(notification_handler);
|
||||||
@ -2689,8 +2689,8 @@ bool win32_get_video_output(DEVMODE *dm, int mode, size_t len)
|
|||||||
{
|
{
|
||||||
memset(dm, 0, len);
|
memset(dm, 0, len);
|
||||||
dm->dmSize = len;
|
dm->dmSize = len;
|
||||||
if (WIN32_GET_VIDEO_OUTPUT((mode == -1)
|
if (WIN32_GET_VIDEO_OUTPUT((mode == -1)
|
||||||
? ENUM_CURRENT_SETTINGS
|
? ENUM_CURRENT_SETTINGS
|
||||||
: (DWORD)mode,
|
: (DWORD)mode,
|
||||||
dm) == 0)
|
dm) == 0)
|
||||||
return false;
|
return false;
|
||||||
@ -2732,7 +2732,7 @@ bool win32_window_init(WNDCLASSEX *wndclass,
|
|||||||
bool fullscreen, const char *class_name)
|
bool fullscreen, const char *class_name)
|
||||||
{
|
{
|
||||||
#if _WIN32_WINNT >= 0x0501
|
#if _WIN32_WINNT >= 0x0501
|
||||||
/* Use the language set in the config for the menubar...
|
/* Use the language set in the config for the menubar...
|
||||||
* also changes the console language. */
|
* also changes the console language. */
|
||||||
SetThreadUILanguage(win32_get_langid_from_retro_lang(
|
SetThreadUILanguage(win32_get_langid_from_retro_lang(
|
||||||
(enum retro_language)
|
(enum retro_language)
|
||||||
|
@ -291,14 +291,14 @@ static bool get_video_mode(
|
|||||||
Display *dpy, unsigned width, unsigned height,
|
Display *dpy, unsigned width, unsigned height,
|
||||||
XF86VidModeModeInfo *mode, XF86VidModeModeInfo *x11_desktop_mode)
|
XF86VidModeModeInfo *mode, XF86VidModeModeInfo *x11_desktop_mode)
|
||||||
{
|
{
|
||||||
int i, num_modes = 0;
|
int i, num_modes = 0;
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
float refresh_mod = 0.0f;
|
float refresh_mod = 0.0f;
|
||||||
float minimum_fps_diff = 0.0f;
|
float minimum_fps_diff = 0.0f;
|
||||||
XF86VidModeModeInfo **modes = NULL;
|
XF86VidModeModeInfo **modes = NULL;
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
unsigned black_frame_insertion = settings->uints.video_black_frame_insertion;
|
unsigned black_frame_insertion = settings->uints.video_black_frame_insertion;
|
||||||
float video_refresh_rate = settings->floats.video_refresh_rate;
|
float video_refresh_rate = settings->floats.video_refresh_rate;
|
||||||
|
|
||||||
XF86VidModeGetAllModeLines(dpy, DefaultScreen(dpy), &num_modes, &modes);
|
XF86VidModeGetAllModeLines(dpy, DefaultScreen(dpy), &num_modes, &modes);
|
||||||
|
|
||||||
@ -425,7 +425,7 @@ static bool x11_create_input_context(Display *dpy,
|
|||||||
x11_init_keyboard_lut();
|
x11_init_keyboard_lut();
|
||||||
|
|
||||||
g_x11_has_focus = true;
|
g_x11_has_focus = true;
|
||||||
|
|
||||||
if (!(*xim = XOpenIM(dpy, NULL, NULL, NULL)))
|
if (!(*xim = XOpenIM(dpy, NULL, NULL, NULL)))
|
||||||
{
|
{
|
||||||
RARCH_ERR("[X11]: Failed to open input method.\n");
|
RARCH_ERR("[X11]: Failed to open input method.\n");
|
||||||
@ -473,7 +473,7 @@ bool x11_get_metrics(void *data,
|
|||||||
break;
|
break;
|
||||||
case DISPLAY_METRIC_DPI:
|
case DISPLAY_METRIC_DPI:
|
||||||
dpy = (Display*)XOpenDisplay(NULL);
|
dpy = (Display*)XOpenDisplay(NULL);
|
||||||
*value = ((((float)DisplayWidth (dpy, screen_no)) * 25.4)
|
*value = ((((float)DisplayWidth (dpy, screen_no)) * 25.4)
|
||||||
/ ( (float)DisplayWidthMM(dpy, screen_no)));
|
/ ( (float)DisplayWidthMM(dpy, screen_no)));
|
||||||
XCloseDisplay(dpy);
|
XCloseDisplay(dpy);
|
||||||
break;
|
break;
|
||||||
@ -551,8 +551,8 @@ static void x11_handle_key_event(unsigned keycode, XEvent *event,
|
|||||||
(state & ShiftMask) || (state & LockMask));
|
(state & ShiftMask) || (state & LockMask));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We can't feed uppercase letters to the keycode translator.
|
/* We can't feed uppercase letters to the keycode translator.
|
||||||
* Seems like a bad idea to feed it keysyms anyway, so here
|
* Seems like a bad idea to feed it keysyms anyway, so here
|
||||||
* is a little hack...
|
* is a little hack...
|
||||||
**/
|
**/
|
||||||
if (keysym >= XK_A && keysym <= XK_Z)
|
if (keysym >= XK_A && keysym <= XK_Z)
|
||||||
@ -663,9 +663,9 @@ bool x11_alive(void *data)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case KeyRelease:
|
case KeyRelease:
|
||||||
/* When you receive a key release and the next event
|
/* When you receive a key release and the next event
|
||||||
* is a key press of the same key combination,
|
* is a key press of the same key combination,
|
||||||
* then it's auto-repeat and the key wasn't
|
* then it's auto-repeat and the key wasn't
|
||||||
* actually released. */
|
* actually released. */
|
||||||
if (XEventsQueued(g_x11_dpy, QueuedAfterReading))
|
if (XEventsQueued(g_x11_dpy, QueuedAfterReading))
|
||||||
{
|
{
|
||||||
|
@ -1919,7 +1919,7 @@ bool video_driver_supports_rgba(void)
|
|||||||
bool tmp;
|
bool tmp;
|
||||||
video_driver_state_t *video_st = &video_driver_st;
|
video_driver_state_t *video_st = &video_driver_st;
|
||||||
VIDEO_DRIVER_LOCK(video_st);
|
VIDEO_DRIVER_LOCK(video_st);
|
||||||
tmp = video_st->flags & VIDEO_FLAG_USE_RGBA;
|
tmp = (video_st->flags & VIDEO_FLAG_USE_RGBA) ? true : false;
|
||||||
VIDEO_DRIVER_UNLOCK(video_st);
|
VIDEO_DRIVER_UNLOCK(video_st);
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
@ -1945,7 +1945,7 @@ bool video_driver_supports_hdr(void)
|
|||||||
bool tmp;
|
bool tmp;
|
||||||
video_driver_state_t *video_st = &video_driver_st;
|
video_driver_state_t *video_st = &video_driver_st;
|
||||||
VIDEO_DRIVER_LOCK(video_st);
|
VIDEO_DRIVER_LOCK(video_st);
|
||||||
tmp = video_st->flags & VIDEO_FLAG_HDR_SUPPORT;
|
tmp = (video_st->flags & VIDEO_FLAG_HDR_SUPPORT) ? true : false;
|
||||||
VIDEO_DRIVER_UNLOCK(video_st);
|
VIDEO_DRIVER_UNLOCK(video_st);
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
@ -2625,7 +2625,7 @@ void video_driver_build_info(video_frame_info_t *video_info)
|
|||||||
video_info->menu_wallpaper_opacity = settings->floats.menu_wallpaper_opacity;
|
video_info->menu_wallpaper_opacity = settings->floats.menu_wallpaper_opacity;
|
||||||
video_info->menu_framebuffer_opacity = settings->floats.menu_framebuffer_opacity;
|
video_info->menu_framebuffer_opacity = settings->floats.menu_framebuffer_opacity;
|
||||||
video_info->overlay_behind_menu = settings->bools.input_overlay_behind_menu;
|
video_info->overlay_behind_menu = settings->bools.input_overlay_behind_menu;
|
||||||
video_info->libretro_running = runloop_st->current_core.flags & RETRO_CORE_FLAG_GAME_LOADED;
|
video_info->libretro_running = (runloop_st->current_core.flags & RETRO_CORE_FLAG_GAME_LOADED) ? true : false;
|
||||||
#else
|
#else
|
||||||
video_info->menu_is_alive = false;
|
video_info->menu_is_alive = false;
|
||||||
video_info->menu_screensaver_active = false;
|
video_info->menu_screensaver_active = false;
|
||||||
@ -2709,7 +2709,7 @@ const gfx_ctx_driver_t *video_context_driver_init_first(void *data,
|
|||||||
if (i >= 0)
|
if (i >= 0)
|
||||||
{
|
{
|
||||||
const gfx_ctx_driver_t *ctx = video_context_driver_init(
|
const gfx_ctx_driver_t *ctx = video_context_driver_init(
|
||||||
runloop_flags & RUNLOOP_FLAG_CORE_SET_SHARED_CONTEXT,
|
(runloop_flags & RUNLOOP_FLAG_CORE_SET_SHARED_CONTEXT) ? true : false,
|
||||||
settings,
|
settings,
|
||||||
data,
|
data,
|
||||||
gfx_ctx_gl_drivers[i], ident,
|
gfx_ctx_gl_drivers[i], ident,
|
||||||
@ -2725,7 +2725,7 @@ const gfx_ctx_driver_t *video_context_driver_init_first(void *data,
|
|||||||
{
|
{
|
||||||
const gfx_ctx_driver_t *ctx =
|
const gfx_ctx_driver_t *ctx =
|
||||||
video_context_driver_init(
|
video_context_driver_init(
|
||||||
runloop_flags & RUNLOOP_FLAG_CORE_SET_SHARED_CONTEXT,
|
(runloop_flags & RUNLOOP_FLAG_CORE_SET_SHARED_CONTEXT) ? true : false,
|
||||||
settings,
|
settings,
|
||||||
data,
|
data,
|
||||||
gfx_ctx_gl_drivers[i], ident,
|
gfx_ctx_gl_drivers[i], ident,
|
||||||
|
@ -305,8 +305,8 @@ static void dinput_poll(void *data)
|
|||||||
POINT point;
|
POINT point;
|
||||||
DIMOUSESTATE2 mouse_state;
|
DIMOUSESTATE2 mouse_state;
|
||||||
BYTE *rgb_buttons_ptr = &mouse_state.rgbButtons[0];
|
BYTE *rgb_buttons_ptr = &mouse_state.rgbButtons[0];
|
||||||
bool swap_mouse_buttons = g_win32_flags & WIN32_CMN_FLAG_SWAP_MOUSE_BTNS;
|
bool swap_mouse_buttons = (g_win32_flags & WIN32_CMN_FLAG_SWAP_MOUSE_BTNS) ? true : false;
|
||||||
|
|
||||||
point.x = 0;
|
point.x = 0;
|
||||||
point.y = 0;
|
point.y = 0;
|
||||||
|
|
||||||
@ -412,29 +412,29 @@ static bool dinput_mouse_button_pressed(
|
|||||||
switch (key)
|
switch (key)
|
||||||
{
|
{
|
||||||
case RETRO_DEVICE_ID_MOUSE_LEFT:
|
case RETRO_DEVICE_ID_MOUSE_LEFT:
|
||||||
return (di->flags & DINP_FLAG_MOUSE_L_BTN);
|
return (di->flags & DINP_FLAG_MOUSE_L_BTN) ? true : false;
|
||||||
case RETRO_DEVICE_ID_MOUSE_RIGHT:
|
case RETRO_DEVICE_ID_MOUSE_RIGHT:
|
||||||
return (di->flags & DINP_FLAG_MOUSE_R_BTN);
|
return (di->flags & DINP_FLAG_MOUSE_R_BTN) ? true : false;
|
||||||
case RETRO_DEVICE_ID_MOUSE_MIDDLE:
|
case RETRO_DEVICE_ID_MOUSE_MIDDLE:
|
||||||
return (di->flags & DINP_FLAG_MOUSE_M_BTN);
|
return (di->flags & DINP_FLAG_MOUSE_M_BTN) ? true : false;
|
||||||
case RETRO_DEVICE_ID_MOUSE_BUTTON_4:
|
case RETRO_DEVICE_ID_MOUSE_BUTTON_4:
|
||||||
return (di->flags & DINP_FLAG_MOUSE_B4_BTN);
|
return (di->flags & DINP_FLAG_MOUSE_B4_BTN) ? true : false;
|
||||||
case RETRO_DEVICE_ID_MOUSE_BUTTON_5:
|
case RETRO_DEVICE_ID_MOUSE_BUTTON_5:
|
||||||
return (di->flags & DINP_FLAG_MOUSE_B5_BTN);
|
return (di->flags & DINP_FLAG_MOUSE_B5_BTN) ? true : false;
|
||||||
case RETRO_DEVICE_ID_MOUSE_WHEELUP:
|
case RETRO_DEVICE_ID_MOUSE_WHEELUP:
|
||||||
result = di->flags & DINP_FLAG_MOUSE_WU_BTN;
|
result = (di->flags & DINP_FLAG_MOUSE_WU_BTN) ? true : false;
|
||||||
di->flags &= ~DINP_FLAG_MOUSE_WU_BTN;
|
di->flags &= ~DINP_FLAG_MOUSE_WU_BTN;
|
||||||
break;
|
break;
|
||||||
case RETRO_DEVICE_ID_MOUSE_WHEELDOWN:
|
case RETRO_DEVICE_ID_MOUSE_WHEELDOWN:
|
||||||
result = di->flags & DINP_FLAG_MOUSE_WD_BTN;
|
result = (di->flags & DINP_FLAG_MOUSE_WD_BTN) ? true : false;
|
||||||
di->flags &= ~DINP_FLAG_MOUSE_WD_BTN;
|
di->flags &= ~DINP_FLAG_MOUSE_WD_BTN;
|
||||||
break;
|
break;
|
||||||
case RETRO_DEVICE_ID_MOUSE_HORIZ_WHEELUP:
|
case RETRO_DEVICE_ID_MOUSE_HORIZ_WHEELUP:
|
||||||
result = di->flags & DINP_FLAG_MOUSE_HWU_BTN;
|
result = (di->flags & DINP_FLAG_MOUSE_HWU_BTN) ? true : false;
|
||||||
di->flags &= ~DINP_FLAG_MOUSE_HWU_BTN;
|
di->flags &= ~DINP_FLAG_MOUSE_HWU_BTN;
|
||||||
break;
|
break;
|
||||||
case RETRO_DEVICE_ID_MOUSE_HORIZ_WHEELDOWN:
|
case RETRO_DEVICE_ID_MOUSE_HORIZ_WHEELDOWN:
|
||||||
result = di->flags & DINP_FLAG_MOUSE_HWD_BTN;
|
result = (di->flags & DINP_FLAG_MOUSE_HWD_BTN) ? true : false;
|
||||||
di->flags &= ~DINP_FLAG_MOUSE_HWD_BTN;
|
di->flags &= ~DINP_FLAG_MOUSE_HWD_BTN;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -456,7 +456,7 @@ static int16_t dinput_lightgun_aiming_state(
|
|||||||
int y = 0;
|
int y = 0;
|
||||||
unsigned num = 0;
|
unsigned num = 0;
|
||||||
|
|
||||||
struct dinput_pointer_status
|
struct dinput_pointer_status
|
||||||
*check_pos = di->pointer_head.next;
|
*check_pos = di->pointer_head.next;
|
||||||
|
|
||||||
vp.x = 0;
|
vp.x = 0;
|
||||||
@ -488,8 +488,8 @@ static int16_t dinput_lightgun_aiming_state(
|
|||||||
&vp, x, y,
|
&vp, x, y,
|
||||||
&res_x, &res_y, &res_screen_x, &res_screen_y))
|
&res_x, &res_y, &res_screen_x, &res_screen_y))
|
||||||
{
|
{
|
||||||
bool inside =
|
bool inside =
|
||||||
(res_x >= -edge_detect)
|
(res_x >= -edge_detect)
|
||||||
&& (res_y >= -edge_detect)
|
&& (res_y >= -edge_detect)
|
||||||
&& (res_x <= edge_detect)
|
&& (res_x <= edge_detect)
|
||||||
&& (res_y <= edge_detect);
|
&& (res_y <= edge_detect);
|
||||||
@ -614,7 +614,7 @@ static int16_t dinput_input_state(
|
|||||||
if (binds[port][id].key < RETROK_LAST
|
if (binds[port][id].key < RETROK_LAST
|
||||||
&& (di->state[rarch_keysym_lut
|
&& (di->state[rarch_keysym_lut
|
||||||
[(enum retro_key)binds[port][id].key]] & 0x80)
|
[(enum retro_key)binds[port][id].key]] & 0x80)
|
||||||
&& ( (id == RARCH_GAME_FOCUS_TOGGLE)
|
&& ( (id == RARCH_GAME_FOCUS_TOGGLE)
|
||||||
|| !keyboard_mapping_blocked)
|
|| !keyboard_mapping_blocked)
|
||||||
)
|
)
|
||||||
return 1;
|
return 1;
|
||||||
@ -629,7 +629,7 @@ static int16_t dinput_input_state(
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case RETRO_DEVICE_KEYBOARD:
|
case RETRO_DEVICE_KEYBOARD:
|
||||||
return (id < RETROK_LAST) &&
|
return (id < RETROK_LAST) &&
|
||||||
di->state[rarch_keysym_lut[(enum retro_key)id]] & 0x80;
|
di->state[rarch_keysym_lut[(enum retro_key)id]] & 0x80;
|
||||||
case RETRO_DEVICE_ANALOG:
|
case RETRO_DEVICE_ANALOG:
|
||||||
{
|
{
|
||||||
@ -790,7 +790,7 @@ static int16_t dinput_input_state(
|
|||||||
case RETRO_DEVICE_ID_POINTER_Y:
|
case RETRO_DEVICE_ID_POINTER_Y:
|
||||||
return res_y;
|
return res_y;
|
||||||
case RETRO_DEVICE_ID_POINTER_PRESSED:
|
case RETRO_DEVICE_ID_POINTER_PRESSED:
|
||||||
return check_pos ? 1 : (di->flags & DINP_FLAG_MOUSE_L_BTN);
|
return check_pos ? 1 : (di->flags & DINP_FLAG_MOUSE_L_BTN);
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -838,7 +838,7 @@ static int16_t dinput_input_state(
|
|||||||
joyport, (uint16_t)joykey))
|
joyport, (uint16_t)joykey))
|
||||||
return 1;
|
return 1;
|
||||||
if (joyaxis != AXIS_NONE &&
|
if (joyaxis != AXIS_NONE &&
|
||||||
((float)abs(joypad->axis(joyport, joyaxis))
|
((float)abs(joypad->axis(joyport, joyaxis))
|
||||||
/ 0x8000) > axis_threshold)
|
/ 0x8000) > axis_threshold)
|
||||||
return 1;
|
return 1;
|
||||||
else if (
|
else if (
|
||||||
@ -1012,11 +1012,11 @@ bool dinput_handle_message(void *data,
|
|||||||
return true;
|
return true;
|
||||||
case WM_DEVICECHANGE:
|
case WM_DEVICECHANGE:
|
||||||
#if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0500 /* 2K */
|
#if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0500 /* 2K */
|
||||||
if ( wParam == DBT_DEVICEARRIVAL ||
|
if ( wParam == DBT_DEVICEARRIVAL ||
|
||||||
wParam == DBT_DEVICEREMOVECOMPLETE)
|
wParam == DBT_DEVICEREMOVECOMPLETE)
|
||||||
{
|
{
|
||||||
PDEV_BROADCAST_HDR pHdr = (PDEV_BROADCAST_HDR)lParam;
|
PDEV_BROADCAST_HDR pHdr = (PDEV_BROADCAST_HDR)lParam;
|
||||||
/* TODO/FIXME: Don't destroy everything, let's just
|
/* TODO/FIXME: Don't destroy everything, let's just
|
||||||
* handle new devices gracefully */
|
* handle new devices gracefully */
|
||||||
if (pHdr->dbch_devicetype == DBT_DEVTYP_DEVICEINTERFACE)
|
if (pHdr->dbch_devicetype == DBT_DEVTYP_DEVICEINTERFACE)
|
||||||
joypad_driver_reinit(di, di->joypad_drv_name);
|
joypad_driver_reinit(di, di->joypad_drv_name);
|
||||||
|
@ -364,7 +364,7 @@ static void winraw_update_mouse_state(winraw_input_t *wr,
|
|||||||
winraw_mouse_t *mouse, RAWMOUSE *state)
|
winraw_mouse_t *mouse, RAWMOUSE *state)
|
||||||
{
|
{
|
||||||
POINT crs_pos;
|
POINT crs_pos;
|
||||||
bool swap_mouse_buttons = g_win32_flags & WIN32_CMN_FLAG_SWAP_MOUSE_BTNS;
|
bool swap_mouse_buttons = (g_win32_flags & WIN32_CMN_FLAG_SWAP_MOUSE_BTNS) ? true : false;
|
||||||
|
|
||||||
/* Used for fixing coordinates after switching resolutions */
|
/* Used for fixing coordinates after switching resolutions */
|
||||||
GetClientRect((HWND)video_driver_window_get(), &wr->prev_rect);
|
GetClientRect((HWND)video_driver_window_get(), &wr->prev_rect);
|
||||||
|
@ -1219,8 +1219,8 @@ static int16_t input_state_device(
|
|||||||
&& BIT256_GET(input_st->overlay_ptr->overlay_state.buttons, id))
|
&& BIT256_GET(input_st->overlay_ptr->overlay_state.buttons, id))
|
||||||
{
|
{
|
||||||
#ifdef HAVE_MENU
|
#ifdef HAVE_MENU
|
||||||
bool menu_driver_alive = menu_state_get_ptr()->flags &
|
bool menu_driver_alive = (menu_state_get_ptr()->flags &
|
||||||
MENU_ST_FLAG_ALIVE;
|
MENU_ST_FLAG_ALIVE) ? true : false;
|
||||||
#else
|
#else
|
||||||
bool menu_driver_alive = false;
|
bool menu_driver_alive = false;
|
||||||
#endif
|
#endif
|
||||||
@ -1591,7 +1591,7 @@ static int16_t input_state_internal(
|
|||||||
sec_joypad,
|
sec_joypad,
|
||||||
&joypad_info,
|
&joypad_info,
|
||||||
(*input_st->libretro_input_binds),
|
(*input_st->libretro_input_binds),
|
||||||
input_st->flags & INP_FLAG_KB_MAPPING_BLOCKED,
|
(input_st->flags & INP_FLAG_KB_MAPPING_BLOCKED) ? true : false,
|
||||||
mapped_port, device, idx, id);
|
mapped_port, device, idx, id);
|
||||||
|
|
||||||
if ( (device == RETRO_DEVICE_ANALOG)
|
if ( (device == RETRO_DEVICE_ANALOG)
|
||||||
@ -2377,8 +2377,8 @@ static void input_overlay_parse_layout(
|
|||||||
/* > Portrait display orientations */
|
/* > Portrait display orientations */
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
float scale = layout_desc->scale_portrait;
|
float scale = layout_desc->scale_portrait;
|
||||||
float aspect_adjust = layout_desc->aspect_adjust_portrait;
|
float aspect_adjust = layout_desc->aspect_adjust_portrait;
|
||||||
|
|
||||||
overlay_layout->x_offset = layout_desc->x_offset_portrait;
|
overlay_layout->x_offset = layout_desc->x_offset_portrait;
|
||||||
overlay_layout->y_offset = layout_desc->y_offset_portrait * -1.0f;
|
overlay_layout->y_offset = layout_desc->y_offset_portrait * -1.0f;
|
||||||
@ -4791,7 +4791,7 @@ static void input_keys_pressed(
|
|||||||
sec_joypad,
|
sec_joypad,
|
||||||
joypad_info,
|
joypad_info,
|
||||||
binds,
|
binds,
|
||||||
input_st->flags & INP_FLAG_KB_MAPPING_BLOCKED,
|
(input_st->flags & INP_FLAG_KB_MAPPING_BLOCKED) ? true : false,
|
||||||
port, RETRO_DEVICE_JOYPAD, 0,
|
port, RETRO_DEVICE_JOYPAD, 0,
|
||||||
RARCH_ENABLE_HOTKEY))
|
RARCH_ENABLE_HOTKEY))
|
||||||
{
|
{
|
||||||
@ -4825,7 +4825,7 @@ static void input_keys_pressed(
|
|||||||
sec_joypad,
|
sec_joypad,
|
||||||
joypad_info,
|
joypad_info,
|
||||||
binds,
|
binds,
|
||||||
input_st->flags & INP_FLAG_KB_MAPPING_BLOCKED,
|
(input_st->flags & INP_FLAG_KB_MAPPING_BLOCKED) ? true : false,
|
||||||
port, RETRO_DEVICE_JOYPAD, 0,
|
port, RETRO_DEVICE_JOYPAD, 0,
|
||||||
RARCH_GAME_FOCUS_TOGGLE))
|
RARCH_GAME_FOCUS_TOGGLE))
|
||||||
input_st->flags &= ~INP_FLAG_BLOCK_HOTKEY;
|
input_st->flags &= ~INP_FLAG_BLOCK_HOTKEY;
|
||||||
@ -4847,7 +4847,7 @@ static void input_keys_pressed(
|
|||||||
sec_joypad,
|
sec_joypad,
|
||||||
joypad_info,
|
joypad_info,
|
||||||
binds,
|
binds,
|
||||||
input_st->flags & INP_FLAG_KB_MAPPING_BLOCKED,
|
(input_st->flags & INP_FLAG_KB_MAPPING_BLOCKED) ? true : false,
|
||||||
port, RETRO_DEVICE_JOYPAD, 0,
|
port, RETRO_DEVICE_JOYPAD, 0,
|
||||||
RETRO_DEVICE_ID_JOYPAD_MASK);
|
RETRO_DEVICE_ID_JOYPAD_MASK);
|
||||||
|
|
||||||
@ -4879,7 +4879,7 @@ static void input_keys_pressed(
|
|||||||
sec_joypad,
|
sec_joypad,
|
||||||
joypad_info,
|
joypad_info,
|
||||||
binds,
|
binds,
|
||||||
input_st->flags & INP_FLAG_KB_MAPPING_BLOCKED,
|
(input_st->flags & INP_FLAG_KB_MAPPING_BLOCKED) ? true : false,
|
||||||
port, RETRO_DEVICE_KEYBOARD, 0,
|
port, RETRO_DEVICE_KEYBOARD, 0,
|
||||||
input_config_binds[port][i].key);
|
input_config_binds[port][i].key);
|
||||||
|
|
||||||
@ -4893,7 +4893,7 @@ static void input_keys_pressed(
|
|||||||
sec_joypad,
|
sec_joypad,
|
||||||
joypad_info,
|
joypad_info,
|
||||||
binds,
|
binds,
|
||||||
input_st->flags & INP_FLAG_KB_MAPPING_BLOCKED,
|
(input_st->flags & INP_FLAG_KB_MAPPING_BLOCKED) ? true : false,
|
||||||
port, RETRO_DEVICE_JOYPAD, 0, i);
|
port, RETRO_DEVICE_JOYPAD, 0, i);
|
||||||
|
|
||||||
if (
|
if (
|
||||||
@ -4947,7 +4947,7 @@ static void input_keys_pressed(
|
|||||||
sec_joypad,
|
sec_joypad,
|
||||||
joypad_info,
|
joypad_info,
|
||||||
binds,
|
binds,
|
||||||
input_st->flags & INP_FLAG_KB_MAPPING_BLOCKED,
|
(input_st->flags & INP_FLAG_KB_MAPPING_BLOCKED) ? true : false,
|
||||||
port, RETRO_DEVICE_KEYBOARD, 0,
|
port, RETRO_DEVICE_KEYBOARD, 0,
|
||||||
input_config_binds[port][i].key))
|
input_config_binds[port][i].key))
|
||||||
{
|
{
|
||||||
@ -4965,7 +4965,7 @@ static void input_keys_pressed(
|
|||||||
sec_joypad,
|
sec_joypad,
|
||||||
joypad_info,
|
joypad_info,
|
||||||
binds,
|
binds,
|
||||||
input_st->flags & INP_FLAG_KB_MAPPING_BLOCKED,
|
(input_st->flags & INP_FLAG_KB_MAPPING_BLOCKED) ? true : false,
|
||||||
port, RETRO_DEVICE_JOYPAD, 0,
|
port, RETRO_DEVICE_JOYPAD, 0,
|
||||||
i))
|
i))
|
||||||
{
|
{
|
||||||
@ -4991,7 +4991,7 @@ static void input_keys_pressed(
|
|||||||
sec_joypad,
|
sec_joypad,
|
||||||
joypad_info,
|
joypad_info,
|
||||||
binds,
|
binds,
|
||||||
input_st->flags & INP_FLAG_KB_MAPPING_BLOCKED,
|
(input_st->flags & INP_FLAG_KB_MAPPING_BLOCKED) ? true : false,
|
||||||
port, RETRO_DEVICE_KEYBOARD, 0,
|
port, RETRO_DEVICE_KEYBOARD, 0,
|
||||||
input_config_binds[port][i].key))
|
input_config_binds[port][i].key))
|
||||||
{
|
{
|
||||||
@ -5010,7 +5010,7 @@ static void input_keys_pressed(
|
|||||||
sec_joypad,
|
sec_joypad,
|
||||||
joypad_info,
|
joypad_info,
|
||||||
binds,
|
binds,
|
||||||
input_st->flags & INP_FLAG_KB_MAPPING_BLOCKED,
|
(input_st->flags & INP_FLAG_KB_MAPPING_BLOCKED) ? true : false,
|
||||||
port, RETRO_DEVICE_JOYPAD, 0,
|
port, RETRO_DEVICE_JOYPAD, 0,
|
||||||
i))
|
i))
|
||||||
{
|
{
|
||||||
@ -5042,7 +5042,7 @@ static void input_keys_pressed(
|
|||||||
sec_joypad,
|
sec_joypad,
|
||||||
joypad_info,
|
joypad_info,
|
||||||
binds,
|
binds,
|
||||||
input_st->flags & INP_FLAG_KB_MAPPING_BLOCKED,
|
(input_st->flags & INP_FLAG_KB_MAPPING_BLOCKED) ? true : false,
|
||||||
port, RETRO_DEVICE_JOYPAD, 0,
|
port, RETRO_DEVICE_JOYPAD, 0,
|
||||||
i);
|
i);
|
||||||
|
|
||||||
@ -5317,8 +5317,8 @@ bool replay_set_serialized_data(void* buf)
|
|||||||
{
|
{
|
||||||
uint8_t *buffer = buf;
|
uint8_t *buffer = buf;
|
||||||
input_driver_state_t *input_st = &input_driver_st;
|
input_driver_state_t *input_st = &input_driver_st;
|
||||||
bool playback = input_st->bsv_movie_state.flags & BSV_FLAG_MOVIE_PLAYBACK;
|
bool playback = (input_st->bsv_movie_state.flags & BSV_FLAG_MOVIE_PLAYBACK) ? true : false;
|
||||||
bool recording = input_st->bsv_movie_state.flags & BSV_FLAG_MOVIE_RECORDING;
|
bool recording = (input_st->bsv_movie_state.flags & BSV_FLAG_MOVIE_RECORDING) ? true : false;
|
||||||
|
|
||||||
/* If there is no current replay, ignore this entirely.
|
/* If there is no current replay, ignore this entirely.
|
||||||
TODO/FIXME: Later, consider loading up the replay
|
TODO/FIXME: Later, consider loading up the replay
|
||||||
@ -5465,7 +5465,7 @@ void input_driver_poll(void)
|
|||||||
sec_joypad,
|
sec_joypad,
|
||||||
&joypad_info[i],
|
&joypad_info[i],
|
||||||
(*input_st->libretro_input_binds),
|
(*input_st->libretro_input_binds),
|
||||||
input_st->flags & INP_FLAG_KB_MAPPING_BLOCKED,
|
(input_st->flags & INP_FLAG_KB_MAPPING_BLOCKED) ? true : false,
|
||||||
(unsigned)i,
|
(unsigned)i,
|
||||||
RETRO_DEVICE_JOYPAD,
|
RETRO_DEVICE_JOYPAD,
|
||||||
0,
|
0,
|
||||||
@ -5473,8 +5473,8 @@ void input_driver_poll(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_OVERLAY
|
#ifdef HAVE_OVERLAY
|
||||||
if (input_st->overlay_ptr &&
|
if ( input_st->overlay_ptr
|
||||||
(input_st->overlay_ptr->flags & INPUT_OVERLAY_ALIVE))
|
&& (input_st->overlay_ptr->flags & INPUT_OVERLAY_ALIVE))
|
||||||
{
|
{
|
||||||
unsigned input_analog_dpad_mode = settings->uints.input_analog_dpad_mode[0];
|
unsigned input_analog_dpad_mode = settings->uints.input_analog_dpad_mode[0];
|
||||||
float input_overlay_opacity = (input_st->overlay_ptr->flags & INPUT_OVERLAY_IS_OSK)
|
float input_overlay_opacity = (input_st->overlay_ptr->flags & INPUT_OVERLAY_IS_OSK)
|
||||||
@ -5502,7 +5502,7 @@ void input_driver_poll(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
input_poll_overlay(
|
input_poll_overlay(
|
||||||
input_st->flags & INP_FLAG_KB_MAPPING_BLOCKED,
|
(input_st->flags & INP_FLAG_KB_MAPPING_BLOCKED) ? true : false,
|
||||||
settings,
|
settings,
|
||||||
input_st->overlay_ptr,
|
input_st->overlay_ptr,
|
||||||
input_st->overlay_visibility,
|
input_st->overlay_visibility,
|
||||||
@ -5568,7 +5568,7 @@ void input_driver_poll(void)
|
|||||||
sec_joypad,
|
sec_joypad,
|
||||||
&joypad_info[i],
|
&joypad_info[i],
|
||||||
(*input_st->libretro_input_binds),
|
(*input_st->libretro_input_binds),
|
||||||
input_st->flags & INP_FLAG_KB_MAPPING_BLOCKED,
|
(input_st->flags & INP_FLAG_KB_MAPPING_BLOCKED) ? true : false,
|
||||||
(unsigned)i, RETRO_DEVICE_JOYPAD,
|
(unsigned)i, RETRO_DEVICE_JOYPAD,
|
||||||
0, RETRO_DEVICE_ID_JOYPAD_MASK);
|
0, RETRO_DEVICE_ID_JOYPAD_MASK);
|
||||||
|
|
||||||
@ -6172,8 +6172,8 @@ void input_driver_collect_system_input(input_driver_state_t *input_st,
|
|||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_MENU
|
#ifdef HAVE_MENU
|
||||||
bool display_kb = menu_input_dialog_get_display_kb();
|
bool display_kb = menu_input_dialog_get_display_kb();
|
||||||
bool menu_is_alive = menu_state_get_ptr()->flags &
|
bool menu_is_alive = (menu_state_get_ptr()->flags &
|
||||||
MENU_ST_FLAG_ALIVE;
|
MENU_ST_FLAG_ALIVE) ? true : false;
|
||||||
bool menu_input_active = menu_is_alive &&
|
bool menu_input_active = menu_is_alive &&
|
||||||
!(settings->bools.menu_unified_controls && !display_kb);
|
!(settings->bools.menu_unified_controls && !display_kb);
|
||||||
#endif
|
#endif
|
||||||
@ -6325,7 +6325,7 @@ void input_driver_collect_system_input(input_driver_state_t *input_st,
|
|||||||
sec_joypad,
|
sec_joypad,
|
||||||
&joypad_info,
|
&joypad_info,
|
||||||
(const retro_keybind_set *)input_config_binds,
|
(const retro_keybind_set *)input_config_binds,
|
||||||
input_st->flags & INP_FLAG_KB_MAPPING_BLOCKED,
|
(input_st->flags & INP_FLAG_KB_MAPPING_BLOCKED) ? true : false,
|
||||||
0,
|
0,
|
||||||
RETRO_DEVICE_KEYBOARD, 0, ids[i][0]))
|
RETRO_DEVICE_KEYBOARD, 0, ids[i][0]))
|
||||||
BIT256_SET_PTR(current_bits, ids[i][1]);
|
BIT256_SET_PTR(current_bits, ids[i][1]);
|
||||||
|
@ -357,7 +357,7 @@ static enum msg_hash_enums action_ok_dl_to_enum(unsigned lbl)
|
|||||||
case ACTION_OK_DL_VIDEO_SCALING_SETTINGS_LIST:
|
case ACTION_OK_DL_VIDEO_SCALING_SETTINGS_LIST:
|
||||||
return MENU_ENUM_LABEL_DEFERRED_VIDEO_SCALING_SETTINGS_LIST;
|
return MENU_ENUM_LABEL_DEFERRED_VIDEO_SCALING_SETTINGS_LIST;
|
||||||
case ACTION_OK_DL_VIDEO_HDR_SETTINGS_LIST:
|
case ACTION_OK_DL_VIDEO_HDR_SETTINGS_LIST:
|
||||||
return MENU_ENUM_LABEL_DEFERRED_VIDEO_HDR_SETTINGS_LIST;
|
return MENU_ENUM_LABEL_DEFERRED_VIDEO_HDR_SETTINGS_LIST;
|
||||||
case ACTION_OK_DL_VIDEO_OUTPUT_SETTINGS_LIST:
|
case ACTION_OK_DL_VIDEO_OUTPUT_SETTINGS_LIST:
|
||||||
return MENU_ENUM_LABEL_DEFERRED_VIDEO_OUTPUT_SETTINGS_LIST;
|
return MENU_ENUM_LABEL_DEFERRED_VIDEO_OUTPUT_SETTINGS_LIST;
|
||||||
case ACTION_OK_DL_CRT_SWITCHRES_SETTINGS_LIST:
|
case ACTION_OK_DL_CRT_SWITCHRES_SETTINGS_LIST:
|
||||||
@ -489,7 +489,7 @@ static enum msg_hash_enums action_ok_dl_to_enum(unsigned lbl)
|
|||||||
case ACTION_OK_DL_ACCOUNTS_TWITCH_LIST:
|
case ACTION_OK_DL_ACCOUNTS_TWITCH_LIST:
|
||||||
return MENU_ENUM_LABEL_DEFERRED_ACCOUNTS_TWITCH_LIST;
|
return MENU_ENUM_LABEL_DEFERRED_ACCOUNTS_TWITCH_LIST;
|
||||||
case ACTION_OK_DL_ACCOUNTS_FACEBOOK_LIST:
|
case ACTION_OK_DL_ACCOUNTS_FACEBOOK_LIST:
|
||||||
return MENU_ENUM_LABEL_DEFERRED_ACCOUNTS_FACEBOOK_LIST;
|
return MENU_ENUM_LABEL_DEFERRED_ACCOUNTS_FACEBOOK_LIST;
|
||||||
case ACTION_OK_DL_DUMP_DISC_LIST:
|
case ACTION_OK_DL_DUMP_DISC_LIST:
|
||||||
return MENU_ENUM_LABEL_DEFERRED_DUMP_DISC_LIST;
|
return MENU_ENUM_LABEL_DEFERRED_DUMP_DISC_LIST;
|
||||||
#ifdef HAVE_LAKKA
|
#ifdef HAVE_LAKKA
|
||||||
@ -593,7 +593,7 @@ static const char *menu_driver_get_last_start_file_name(void)
|
|||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
bool use_last = settings->bools.use_last_start_directory;
|
bool use_last = settings->bools.use_last_start_directory;
|
||||||
/* Return NULL if there is no last 'file name' */
|
/* Return NULL if there is no last 'file name' */
|
||||||
if ( !menu
|
if ( !menu
|
||||||
|| !use_last
|
|| !use_last
|
||||||
|| string_is_empty(menu->last_start_content.file_name))
|
|| string_is_empty(menu->last_start_content.file_name))
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -1220,7 +1220,7 @@ int generic_action_ok_displaylist_push(
|
|||||||
struct retro_system_info *sysinfo = &runloop_state_get_ptr()->system.info;
|
struct retro_system_info *sysinfo = &runloop_state_get_ptr()->system.info;
|
||||||
const char *core_name = sysinfo ? sysinfo->library_name : NULL;
|
const char *core_name = sysinfo ? sysinfo->library_name : NULL;
|
||||||
|
|
||||||
if ( !string_is_empty(core_name)
|
if ( !string_is_empty(core_name)
|
||||||
&& !string_is_empty(settings->paths.directory_input_remapping))
|
&& !string_is_empty(settings->paths.directory_input_remapping))
|
||||||
{
|
{
|
||||||
fill_pathname_join_special(tmp,
|
fill_pathname_join_special(tmp,
|
||||||
@ -1489,7 +1489,7 @@ int generic_action_ok_displaylist_push(
|
|||||||
case ACTION_OK_DL_DATABASE_MANAGER_LIST:
|
case ACTION_OK_DL_DATABASE_MANAGER_LIST:
|
||||||
{
|
{
|
||||||
char lpl_basename[PATH_MAX_LENGTH];
|
char lpl_basename[PATH_MAX_LENGTH];
|
||||||
struct menu_state *menu_st = menu_state_get_ptr();
|
struct menu_state *menu_st = menu_state_get_ptr();
|
||||||
filebrowser_clear_type();
|
filebrowser_clear_type();
|
||||||
fill_pathname_join_special(tmp,
|
fill_pathname_join_special(tmp,
|
||||||
settings->paths.path_content_database,
|
settings->paths.path_content_database,
|
||||||
@ -1736,7 +1736,7 @@ int generic_action_ok_displaylist_push(
|
|||||||
case ACTION_OK_DL_ACCOUNTS_CHEEVOS_LIST:
|
case ACTION_OK_DL_ACCOUNTS_CHEEVOS_LIST:
|
||||||
case ACTION_OK_DL_ACCOUNTS_YOUTUBE_LIST:
|
case ACTION_OK_DL_ACCOUNTS_YOUTUBE_LIST:
|
||||||
case ACTION_OK_DL_ACCOUNTS_TWITCH_LIST:
|
case ACTION_OK_DL_ACCOUNTS_TWITCH_LIST:
|
||||||
case ACTION_OK_DL_ACCOUNTS_FACEBOOK_LIST:
|
case ACTION_OK_DL_ACCOUNTS_FACEBOOK_LIST:
|
||||||
case ACTION_OK_DL_PLAYLIST_COLLECTION:
|
case ACTION_OK_DL_PLAYLIST_COLLECTION:
|
||||||
case ACTION_OK_DL_FAVORITES_LIST:
|
case ACTION_OK_DL_FAVORITES_LIST:
|
||||||
case ACTION_OK_DL_BROWSE_URL_LIST:
|
case ACTION_OK_DL_BROWSE_URL_LIST:
|
||||||
@ -2200,7 +2200,7 @@ static int generic_action_ok(const char *path,
|
|||||||
/* Check whether this a load or append action */
|
/* Check whether this a load or append action */
|
||||||
if (string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_PREPEND)) ||
|
if (string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_PREPEND)) ||
|
||||||
string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_APPEND)))
|
string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_APPEND)))
|
||||||
menu_shader_manager_append_preset(shader, action_path,
|
menu_shader_manager_append_preset(shader, action_path,
|
||||||
string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_PREPEND)));
|
string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_PREPEND)));
|
||||||
else
|
else
|
||||||
menu_shader_manager_set_preset(shader,
|
menu_shader_manager_set_preset(shader,
|
||||||
@ -2328,11 +2328,11 @@ static int generic_action_ok(const char *path,
|
|||||||
case ACTION_OK_SET_DIRECTORY:
|
case ACTION_OK_SET_DIRECTORY:
|
||||||
flush_char = msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_DIRECTORY_SETTINGS_LIST);
|
flush_char = msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_DIRECTORY_SETTINGS_LIST);
|
||||||
#ifdef HAVE_COCOATOUCH
|
#ifdef HAVE_COCOATOUCH
|
||||||
/* For iOS, set the path using realpath because the
|
/* For iOS, set the path using realpath because the
|
||||||
* path name can start with /private and this ensures
|
* path name can start with /private and this ensures
|
||||||
* the path starts with it.
|
* the path starts with it.
|
||||||
*
|
*
|
||||||
* This will allow the path to be properly substituted
|
* This will allow the path to be properly substituted
|
||||||
* when fill_pathname_expand_special
|
* when fill_pathname_expand_special
|
||||||
* is called.
|
* is called.
|
||||||
*/
|
*/
|
||||||
@ -3032,7 +3032,7 @@ static int action_ok_audio_add_to_mixer_and_collection(const char *path,
|
|||||||
fill_pathname_join_special(combined_path, menu->scratch2_buf,
|
fill_pathname_join_special(combined_path, menu->scratch2_buf,
|
||||||
menu->scratch_buf, sizeof(combined_path));
|
menu->scratch_buf, sizeof(combined_path));
|
||||||
|
|
||||||
/* The push function reads our entry as const,
|
/* The push function reads our entry as const,
|
||||||
so these casts are safe */
|
so these casts are safe */
|
||||||
entry.path = combined_path;
|
entry.path = combined_path;
|
||||||
entry.core_path = (char*)"builtin";
|
entry.core_path = (char*)"builtin";
|
||||||
@ -3199,7 +3199,7 @@ static void menu_input_st_string_cb_disable_kiosk_mode(void *userdata,
|
|||||||
{
|
{
|
||||||
const char *label = menu_input_dialog_get_buffer();
|
const char *label = menu_input_dialog_get_buffer();
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
const char *path_kiosk_mode_password =
|
const char *path_kiosk_mode_password =
|
||||||
settings->paths.kiosk_mode_password;
|
settings->paths.kiosk_mode_password;
|
||||||
|
|
||||||
if (string_is_equal(label, path_kiosk_mode_password))
|
if (string_is_equal(label, path_kiosk_mode_password))
|
||||||
@ -3226,7 +3226,7 @@ static void menu_input_st_string_cb_enable_settings(void *userdata,
|
|||||||
{
|
{
|
||||||
if (str && *str)
|
if (str && *str)
|
||||||
{
|
{
|
||||||
const char *label =
|
const char *label =
|
||||||
menu_input_dialog_get_buffer();
|
menu_input_dialog_get_buffer();
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
const char *menu_content_show_settings_password = settings->paths.menu_content_show_settings_password;
|
const char *menu_content_show_settings_password = settings->paths.menu_content_show_settings_password;
|
||||||
@ -3274,7 +3274,7 @@ static void menu_input_st_string_cb_save_preset(void *userdata,
|
|||||||
{
|
{
|
||||||
rarch_setting_t *setting = NULL;
|
rarch_setting_t *setting = NULL;
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
struct menu_state *menu_st = menu_state_get_ptr();
|
struct menu_state *menu_st = menu_state_get_ptr();
|
||||||
const char *label = menu_st->input_dialog_kb_label;
|
const char *label = menu_st->input_dialog_kb_label;
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
const char *dir_video_shader = settings->paths.directory_video_shader;
|
const char *dir_video_shader = settings->paths.directory_video_shader;
|
||||||
@ -3409,9 +3409,9 @@ static int generic_action_ok_shader_preset_save(const char *path,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Save Auto Preset and have it immediately reapply the preset
|
/* Save Auto Preset and have it immediately reapply the preset
|
||||||
* TODO: This seems necessary so that the loaded shader gains a link to the file saved
|
* TODO: This seems necessary so that the loaded shader gains a link to the file saved
|
||||||
* But this is slow and seems like a redundant way to do this
|
* But this is slow and seems like a redundant way to do this
|
||||||
* It seems like it would be better to just set the path and shader_preset_loaded
|
* It seems like it would be better to just set the path and shader_preset_loaded
|
||||||
* on the current shader */
|
* on the current shader */
|
||||||
if (menu_shader_manager_save_auto_preset(menu_shader_get(), preset_type,
|
if (menu_shader_manager_save_auto_preset(menu_shader_get(), preset_type,
|
||||||
dir_video_shader, dir_menu_config,
|
dir_video_shader, dir_menu_config,
|
||||||
@ -3536,7 +3536,7 @@ static void menu_input_st_string_cb_cheat_file_save_as(
|
|||||||
if (str && *str)
|
if (str && *str)
|
||||||
{
|
{
|
||||||
rarch_setting_t *setting = NULL;
|
rarch_setting_t *setting = NULL;
|
||||||
struct menu_state *menu_st = menu_state_get_ptr();
|
struct menu_state *menu_st = menu_state_get_ptr();
|
||||||
const char *label = menu_st->input_dialog_kb_label;
|
const char *label = menu_st->input_dialog_kb_label;
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
const char *path_cheat_database = settings->paths.path_cheat_database;
|
const char *path_cheat_database = settings->paths.path_cheat_database;
|
||||||
@ -4799,8 +4799,8 @@ static void cb_net_generic(retro_task_t *task,
|
|||||||
finish:
|
finish:
|
||||||
menu_st->flags &= ~MENU_ST_FLAG_ENTRIES_NONBLOCKING_REFRESH;
|
menu_st->flags &= ~MENU_ST_FLAG_ENTRIES_NONBLOCKING_REFRESH;
|
||||||
|
|
||||||
if (!err &&
|
if ( !err
|
||||||
!string_ends_with_size(state->path,
|
&& !string_ends_with_size(state->path,
|
||||||
FILE_PATH_INDEX_DIRS_URL,
|
FILE_PATH_INDEX_DIRS_URL,
|
||||||
strlen(state->path),
|
strlen(state->path),
|
||||||
STRLEN_CONST(FILE_PATH_INDEX_DIRS_URL)
|
STRLEN_CONST(FILE_PATH_INDEX_DIRS_URL)
|
||||||
@ -5032,7 +5032,7 @@ void cb_generic_download(retro_task_t *task,
|
|||||||
fill_pathname_join_special(shaderdir, dir_video_shader,
|
fill_pathname_join_special(shaderdir, dir_video_shader,
|
||||||
dirname, sizeof(shaderdir));
|
dirname, sizeof(shaderdir));
|
||||||
|
|
||||||
if ( !path_is_directory(shaderdir)
|
if ( !path_is_directory(shaderdir)
|
||||||
&& !path_mkdir(shaderdir))
|
&& !path_mkdir(shaderdir))
|
||||||
goto finish;
|
goto finish;
|
||||||
|
|
||||||
@ -5637,9 +5637,9 @@ static int action_ok_add_to_favorites(const char *path,
|
|||||||
string_list_append(str_list, content_label, attr);
|
string_list_append(str_list, content_label, attr);
|
||||||
string_list_append(str_list, core_path, attr);
|
string_list_append(str_list, core_path, attr);
|
||||||
string_list_append(str_list, core_name, attr);
|
string_list_append(str_list, core_name, attr);
|
||||||
string_list_append(str_list, !string_is_empty(crc32)
|
string_list_append(str_list, !string_is_empty(crc32)
|
||||||
? crc32 : "", attr);
|
? crc32 : "", attr);
|
||||||
string_list_append(str_list, !string_is_empty(db_name)
|
string_list_append(str_list, !string_is_empty(db_name)
|
||||||
? db_name : "", attr);
|
? db_name : "", attr);
|
||||||
|
|
||||||
/* Trigger 'ADD_TO_FAVORITES' event */
|
/* Trigger 'ADD_TO_FAVORITES' event */
|
||||||
@ -5680,7 +5680,7 @@ static int action_ok_add_to_favorites_playlist(const char *path,
|
|||||||
char core_display_name[PATH_MAX_LENGTH];
|
char core_display_name[PATH_MAX_LENGTH];
|
||||||
char core_path[PATH_MAX_LENGTH];
|
char core_path[PATH_MAX_LENGTH];
|
||||||
char core_name[PATH_MAX_LENGTH];
|
char core_name[PATH_MAX_LENGTH];
|
||||||
struct string_list
|
struct string_list
|
||||||
*str_list = NULL;
|
*str_list = NULL;
|
||||||
|
|
||||||
core_display_name[0] = '\0';
|
core_display_name[0] = '\0';
|
||||||
@ -5718,7 +5718,7 @@ static int action_ok_add_to_favorites_playlist(const char *path,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Replace "DETECT" with default_core_path + name if available */
|
/* Replace "DETECT" with default_core_path + name if available */
|
||||||
if ( !string_is_empty(entry->core_path)
|
if ( !string_is_empty(entry->core_path)
|
||||||
&& !string_is_empty(entry->core_name))
|
&& !string_is_empty(entry->core_name))
|
||||||
{
|
{
|
||||||
if ( string_is_equal(entry->core_path, FILE_PATH_DETECT)
|
if ( string_is_equal(entry->core_path, FILE_PATH_DETECT)
|
||||||
@ -5727,7 +5727,7 @@ static int action_ok_add_to_favorites_playlist(const char *path,
|
|||||||
const char *default_core_path = playlist_get_default_core_path(playlist_curr);
|
const char *default_core_path = playlist_get_default_core_path(playlist_curr);
|
||||||
const char *default_core_name = playlist_get_default_core_name(playlist_curr);
|
const char *default_core_name = playlist_get_default_core_name(playlist_curr);
|
||||||
|
|
||||||
if ( !string_is_empty(default_core_path)
|
if ( !string_is_empty(default_core_path)
|
||||||
&& !string_is_empty(default_core_name))
|
&& !string_is_empty(default_core_name))
|
||||||
{
|
{
|
||||||
strlcpy(core_path, default_core_path, sizeof(core_path));
|
strlcpy(core_path, default_core_path, sizeof(core_path));
|
||||||
@ -5742,7 +5742,7 @@ static int action_ok_add_to_favorites_playlist(const char *path,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* > core_path + core_name */
|
/* > core_path + core_name */
|
||||||
if ( !string_is_empty(core_path)
|
if ( !string_is_empty(core_path)
|
||||||
&& !string_is_empty(core_name))
|
&& !string_is_empty(core_name))
|
||||||
{
|
{
|
||||||
core_info_t *core_info = NULL;
|
core_info_t *core_info = NULL;
|
||||||
@ -7037,9 +7037,9 @@ static int action_ok_push_dropdown_item_input_description(const char *path,
|
|||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
/* Determine user/button indices */
|
/* Determine user/button indices */
|
||||||
user_idx = (entry_type - MENU_SETTINGS_INPUT_DESC_BEGIN)
|
user_idx = (entry_type - MENU_SETTINGS_INPUT_DESC_BEGIN)
|
||||||
/ (RARCH_FIRST_CUSTOM_BIND + 8);
|
/ (RARCH_FIRST_CUSTOM_BIND + 8);
|
||||||
btn_idx = (entry_type - MENU_SETTINGS_INPUT_DESC_BEGIN)
|
btn_idx = (entry_type - MENU_SETTINGS_INPUT_DESC_BEGIN)
|
||||||
- (RARCH_FIRST_CUSTOM_BIND + 8) * user_idx;
|
- (RARCH_FIRST_CUSTOM_BIND + 8) * user_idx;
|
||||||
|
|
||||||
if ((user_idx >= MAX_USERS) || (btn_idx >= RARCH_CUSTOM_BIND_LIST_END))
|
if ((user_idx >= MAX_USERS) || (btn_idx >= RARCH_CUSTOM_BIND_LIST_END))
|
||||||
@ -7067,9 +7067,9 @@ static int action_ok_push_dropdown_item_input_description_kbd(
|
|||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
/* Determine user/button indices */
|
/* Determine user/button indices */
|
||||||
user_idx = (entry_type - MENU_SETTINGS_INPUT_DESC_KBD_BEGIN)
|
user_idx = (entry_type - MENU_SETTINGS_INPUT_DESC_KBD_BEGIN)
|
||||||
/ RARCH_ANALOG_BIND_LIST_END;
|
/ RARCH_ANALOG_BIND_LIST_END;
|
||||||
btn_idx = (entry_type - MENU_SETTINGS_INPUT_DESC_KBD_BEGIN)
|
btn_idx = (entry_type - MENU_SETTINGS_INPUT_DESC_KBD_BEGIN)
|
||||||
- RARCH_ANALOG_BIND_LIST_END * user_idx;
|
- RARCH_ANALOG_BIND_LIST_END * user_idx;
|
||||||
|
|
||||||
if ((user_idx >= MAX_USERS) || (btn_idx >= RARCH_CUSTOM_BIND_LIST_END))
|
if ((user_idx >= MAX_USERS) || (btn_idx >= RARCH_CUSTOM_BIND_LIST_END))
|
||||||
@ -7333,11 +7333,11 @@ static int action_ok_video_resolution(const char *path,
|
|||||||
{
|
{
|
||||||
if (!string_is_empty(desc))
|
if (!string_is_empty(desc))
|
||||||
snprintf(msg, sizeof(msg),
|
snprintf(msg, sizeof(msg),
|
||||||
msg_hash_to_str(MSG_SCREEN_RESOLUTION_APPLYING_DESC),
|
msg_hash_to_str(MSG_SCREEN_RESOLUTION_APPLYING_DESC),
|
||||||
width, height, desc);
|
width, height, desc);
|
||||||
else
|
else
|
||||||
snprintf(msg, sizeof(msg),
|
snprintf(msg, sizeof(msg),
|
||||||
msg_hash_to_str(MSG_SCREEN_RESOLUTION_APPLYING_NO_DESC),
|
msg_hash_to_str(MSG_SCREEN_RESOLUTION_APPLYING_NO_DESC),
|
||||||
width, height);
|
width, height);
|
||||||
}
|
}
|
||||||
runloop_msg_queue_push(msg, 1, 100, true, NULL,
|
runloop_msg_queue_push(msg, 1, 100, true, NULL,
|
||||||
@ -7354,21 +7354,21 @@ static int action_ok_video_resolution(const char *path,
|
|||||||
static int action_ok_playlist_default_core(const char *path,
|
static int action_ok_playlist_default_core(const char *path,
|
||||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||||
{
|
{
|
||||||
return generic_dropdown_box_list(idx,
|
return generic_dropdown_box_list(idx,
|
||||||
ACTION_OK_DL_DROPDOWN_BOX_LIST_PLAYLIST_DEFAULT_CORE);
|
ACTION_OK_DL_DROPDOWN_BOX_LIST_PLAYLIST_DEFAULT_CORE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int action_ok_playlist_label_display_mode(const char *path,
|
static int action_ok_playlist_label_display_mode(const char *path,
|
||||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||||
{
|
{
|
||||||
return generic_dropdown_box_list(idx,
|
return generic_dropdown_box_list(idx,
|
||||||
ACTION_OK_DL_DROPDOWN_BOX_LIST_PLAYLIST_LABEL_DISPLAY_MODE);
|
ACTION_OK_DL_DROPDOWN_BOX_LIST_PLAYLIST_LABEL_DISPLAY_MODE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int action_ok_playlist_right_thumbnail_mode(const char *path,
|
static int action_ok_playlist_right_thumbnail_mode(const char *path,
|
||||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||||
{
|
{
|
||||||
return generic_dropdown_box_list(idx,
|
return generic_dropdown_box_list(idx,
|
||||||
ACTION_OK_DL_DROPDOWN_BOX_LIST_PLAYLIST_RIGHT_THUMBNAIL_MODE);
|
ACTION_OK_DL_DROPDOWN_BOX_LIST_PLAYLIST_RIGHT_THUMBNAIL_MODE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7400,7 +7400,7 @@ static int action_ok_remappings_port_list(const char *path,
|
|||||||
static int action_ok_shader_parameter_dropdown_box_list(const char *path,
|
static int action_ok_shader_parameter_dropdown_box_list(const char *path,
|
||||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||||
{
|
{
|
||||||
return generic_dropdown_box_list(idx,
|
return generic_dropdown_box_list(idx,
|
||||||
ACTION_OK_DL_DROPDOWN_BOX_LIST_SHADER_PARAMETER);
|
ACTION_OK_DL_DROPDOWN_BOX_LIST_SHADER_PARAMETER);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7408,21 +7408,21 @@ static int action_ok_shader_preset_parameter_dropdown_box_list(
|
|||||||
const char *path,
|
const char *path,
|
||||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||||
{
|
{
|
||||||
return generic_dropdown_box_list(idx,
|
return generic_dropdown_box_list(idx,
|
||||||
ACTION_OK_DL_DROPDOWN_BOX_LIST_SHADER_PRESET_PARAMETER);
|
ACTION_OK_DL_DROPDOWN_BOX_LIST_SHADER_PRESET_PARAMETER);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int action_ok_manual_content_scan_system_name(const char *path,
|
static int action_ok_manual_content_scan_system_name(const char *path,
|
||||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||||
{
|
{
|
||||||
return generic_dropdown_box_list(idx,
|
return generic_dropdown_box_list(idx,
|
||||||
ACTION_OK_DL_DROPDOWN_BOX_LIST_MANUAL_CONTENT_SCAN_SYSTEM_NAME);
|
ACTION_OK_DL_DROPDOWN_BOX_LIST_MANUAL_CONTENT_SCAN_SYSTEM_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int action_ok_manual_content_scan_core_name(const char *path,
|
static int action_ok_manual_content_scan_core_name(const char *path,
|
||||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||||
{
|
{
|
||||||
return generic_dropdown_box_list(idx,
|
return generic_dropdown_box_list(idx,
|
||||||
ACTION_OK_DL_DROPDOWN_BOX_LIST_MANUAL_CONTENT_SCAN_CORE_NAME);
|
ACTION_OK_DL_DROPDOWN_BOX_LIST_MANUAL_CONTENT_SCAN_CORE_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7430,7 +7430,7 @@ static int action_ok_video_shader_num_passes_dropdown_box_list(
|
|||||||
const char *path,
|
const char *path,
|
||||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||||
{
|
{
|
||||||
return generic_dropdown_box_list(idx,
|
return generic_dropdown_box_list(idx,
|
||||||
ACTION_OK_DL_DROPDOWN_BOX_LIST_VIDEO_SHADER_NUM_PASSES);
|
ACTION_OK_DL_DROPDOWN_BOX_LIST_VIDEO_SHADER_NUM_PASSES);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7871,7 +7871,7 @@ static int action_ok_core_delete(const char *path,
|
|||||||
/* Need to fetch core name for notification */
|
/* Need to fetch core name for notification */
|
||||||
|
|
||||||
/* If core is found, use display name */
|
/* If core is found, use display name */
|
||||||
if (
|
if (
|
||||||
core_info_find(core_path, &core_info)
|
core_info_find(core_path, &core_info)
|
||||||
&& core_info->display_name)
|
&& core_info->display_name)
|
||||||
core_name = core_info->display_name;
|
core_name = core_info->display_name;
|
||||||
@ -8378,7 +8378,7 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
|
|||||||
{MENU_ENUM_LABEL_BROWSE_START, action_ok_browse_url_start},
|
{MENU_ENUM_LABEL_BROWSE_START, action_ok_browse_url_start},
|
||||||
{MENU_ENUM_LABEL_FILE_BROWSER_CORE, action_ok_load_core},
|
{MENU_ENUM_LABEL_FILE_BROWSER_CORE, action_ok_load_core},
|
||||||
{MENU_ENUM_LABEL_FILE_BROWSER_CORE_SELECT_FROM_COLLECTION, action_ok_core_deferred_set},
|
{MENU_ENUM_LABEL_FILE_BROWSER_CORE_SELECT_FROM_COLLECTION, action_ok_core_deferred_set},
|
||||||
{MENU_ENUM_LABEL_FILE_BROWSER_CORE_SELECT_FROM_COLLECTION_CURRENT_CORE,action_ok_core_deferred_set},
|
{MENU_ENUM_LABEL_FILE_BROWSER_CORE_SELECT_FROM_COLLECTION_CURRENT_CORE,action_ok_core_deferred_set},
|
||||||
{MENU_ENUM_LABEL_START_CORE, action_ok_start_core},
|
{MENU_ENUM_LABEL_START_CORE, action_ok_start_core},
|
||||||
{MENU_ENUM_LABEL_START_NET_RETROPAD, action_ok_start_net_retropad_core},
|
{MENU_ENUM_LABEL_START_NET_RETROPAD, action_ok_start_net_retropad_core},
|
||||||
{MENU_ENUM_LABEL_START_VIDEO_PROCESSOR, action_ok_start_video_processor_core},
|
{MENU_ENUM_LABEL_START_VIDEO_PROCESSOR, action_ok_start_video_processor_core},
|
||||||
@ -8386,7 +8386,7 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
|
|||||||
{MENU_ENUM_LABEL_OPEN_ARCHIVE, action_ok_open_archive},
|
{MENU_ENUM_LABEL_OPEN_ARCHIVE, action_ok_open_archive},
|
||||||
{MENU_ENUM_LABEL_LOAD_ARCHIVE_DETECT_CORE, action_ok_load_archive_detect_core},
|
{MENU_ENUM_LABEL_LOAD_ARCHIVE_DETECT_CORE, action_ok_load_archive_detect_core},
|
||||||
{MENU_ENUM_LABEL_LOAD_ARCHIVE, action_ok_load_archive},
|
{MENU_ENUM_LABEL_LOAD_ARCHIVE, action_ok_load_archive},
|
||||||
{MENU_ENUM_LABEL_CUSTOM_BIND_ALL, action_ok_lookup_setting},
|
{MENU_ENUM_LABEL_CUSTOM_BIND_ALL, action_ok_lookup_setting},
|
||||||
{MENU_ENUM_LABEL_SAVE_STATE, action_ok_save_state},
|
{MENU_ENUM_LABEL_SAVE_STATE, action_ok_save_state},
|
||||||
{MENU_ENUM_LABEL_LOAD_STATE, action_ok_load_state},
|
{MENU_ENUM_LABEL_LOAD_STATE, action_ok_load_state},
|
||||||
{MENU_ENUM_LABEL_UNDO_LOAD_STATE, action_ok_undo_load_state},
|
{MENU_ENUM_LABEL_UNDO_LOAD_STATE, action_ok_undo_load_state},
|
||||||
|
15926
menu/menu_driver.c
15926
menu/menu_driver.c
File diff suppressed because it is too large
Load Diff
@ -7859,8 +7859,8 @@ static enum event_command write_handler_get_cmd(rarch_setting_t *setting)
|
|||||||
if (*setting->value.target.boolean)
|
if (*setting->value.target.boolean)
|
||||||
*setting->value.target.boolean = false;
|
*setting->value.target.boolean = false;
|
||||||
|
|
||||||
if ( (flags & SD_FLAG_CMD_TRIGGER_EVENT_TRIGGERED) ||
|
if ( (flags & SD_FLAG_CMD_TRIGGER_EVENT_TRIGGERED)
|
||||||
(flags & SD_FLAG_CMD_APPLY_AUTO))
|
|| (flags & SD_FLAG_CMD_APPLY_AUTO))
|
||||||
return setting->cmd_trigger_idx;
|
return setting->cmd_trigger_idx;
|
||||||
}
|
}
|
||||||
return CMD_EVENT_NONE;
|
return CMD_EVENT_NONE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user