mirror of
https://github.com/libretro/RetroArch
synced 2025-03-20 10:20:51 +00:00
Cleanup
This commit is contained in:
parent
142503d3b5
commit
a67896ab2b
@ -500,9 +500,10 @@ bool win32_load_content_from_gui(const char *szFilename)
|
|||||||
{
|
{
|
||||||
bool okay = false;
|
bool okay = false;
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
|
bool video_is_fs = settings->bools.video_fullscreen;
|
||||||
|
|
||||||
/* Fullscreen: Show mouse cursor for dialog */
|
/* Fullscreen: Show mouse cursor for dialog */
|
||||||
if (settings->bools.video_fullscreen)
|
if (video_is_fs)
|
||||||
video_driver_show_mouse();
|
video_driver_show_mouse();
|
||||||
|
|
||||||
/* Pick one core that could be compatible, ew */
|
/* Pick one core that could be compatible, ew */
|
||||||
@ -515,7 +516,7 @@ bool win32_load_content_from_gui(const char *szFilename)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Fullscreen: Hide mouse cursor after dialog */
|
/* Fullscreen: Hide mouse cursor after dialog */
|
||||||
if (settings->bools.video_fullscreen)
|
if (video_is_fs)
|
||||||
video_driver_hide_mouse();
|
video_driver_hide_mouse();
|
||||||
return okay;
|
return okay;
|
||||||
}
|
}
|
||||||
@ -660,14 +661,13 @@ static LRESULT win32_menu_loop(HWND owner, WPARAM wparam)
|
|||||||
{
|
{
|
||||||
WPARAM mode = wparam & 0xffff;
|
WPARAM mode = wparam & 0xffff;
|
||||||
enum event_command cmd = CMD_EVENT_NONE;
|
enum event_command cmd = CMD_EVENT_NONE;
|
||||||
bool do_wm_close = false;
|
|
||||||
settings_t *settings = config_get_ptr();
|
|
||||||
|
|
||||||
switch (mode)
|
switch (mode)
|
||||||
{
|
{
|
||||||
case ID_M_LOAD_CORE:
|
case ID_M_LOAD_CORE:
|
||||||
{
|
{
|
||||||
char win32_file[PATH_MAX_LENGTH] = {0};
|
char win32_file[PATH_MAX_LENGTH] = {0};
|
||||||
|
settings_t *settings = config_get_ptr();
|
||||||
char *title_cp = NULL;
|
char *title_cp = NULL;
|
||||||
size_t converted = 0;
|
size_t converted = 0;
|
||||||
const char *extensions = "Libretro core (.dll)\0*.dll\0All Files\0*.*\0\0";
|
const char *extensions = "Libretro core (.dll)\0*.dll\0All Files\0*.*\0\0";
|
||||||
@ -711,6 +711,7 @@ static LRESULT win32_menu_loop(HWND owner, WPARAM wparam)
|
|||||||
const char *extensions = "All Files (*.*)\0*.*\0\0";
|
const char *extensions = "All Files (*.*)\0*.*\0\0";
|
||||||
const char *title = msg_hash_to_str(
|
const char *title = msg_hash_to_str(
|
||||||
MENU_ENUM_LABEL_VALUE_LOAD_CONTENT_LIST);
|
MENU_ENUM_LABEL_VALUE_LOAD_CONTENT_LIST);
|
||||||
|
settings_t *settings = config_get_ptr();
|
||||||
const char *initial_dir = settings->paths.directory_menu_content;
|
const char *initial_dir = settings->paths.directory_menu_content;
|
||||||
|
|
||||||
/* Convert UTF8 to UTF16, then back to the
|
/* Convert UTF8 to UTF16, then back to the
|
||||||
@ -778,12 +779,14 @@ static LRESULT win32_menu_loop(HWND owner, WPARAM wparam)
|
|||||||
cmd = CMD_EVENT_TAKE_SCREENSHOT;
|
cmd = CMD_EVENT_TAKE_SCREENSHOT;
|
||||||
break;
|
break;
|
||||||
case ID_M_QUIT:
|
case ID_M_QUIT:
|
||||||
do_wm_close = true;
|
PostMessage(owner, WM_CLOSE, 0, 0);
|
||||||
break;
|
break;
|
||||||
case ID_M_TOGGLE_DESKTOP:
|
case ID_M_TOGGLE_DESKTOP:
|
||||||
cmd = CMD_EVENT_UI_COMPANION_TOGGLE;
|
cmd = CMD_EVENT_UI_COMPANION_TOGGLE;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
{
|
||||||
|
settings_t *settings = config_get_ptr();
|
||||||
if (mode >= ID_M_WINDOW_SCALE_1X && mode <= ID_M_WINDOW_SCALE_10X)
|
if (mode >= ID_M_WINDOW_SCALE_1X && mode <= ID_M_WINDOW_SCALE_10X)
|
||||||
{
|
{
|
||||||
unsigned idx = (mode - (ID_M_WINDOW_SCALE_1X-1));
|
unsigned idx = (mode - (ID_M_WINDOW_SCALE_1X-1));
|
||||||
@ -803,15 +806,13 @@ static LRESULT win32_menu_loop(HWND owner, WPARAM wparam)
|
|||||||
configuration_set_int(
|
configuration_set_int(
|
||||||
settings, settings->ints.state_slot, idx);
|
settings, settings->ints.state_slot, idx);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cmd != CMD_EVENT_NONE)
|
if (cmd != CMD_EVENT_NONE)
|
||||||
command_event(cmd, NULL);
|
command_event(cmd, NULL);
|
||||||
|
|
||||||
if (do_wm_close)
|
|
||||||
PostMessage(owner, WM_CLOSE, 0, 0);
|
|
||||||
|
|
||||||
return 0L;
|
return 0L;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -890,7 +891,8 @@ static LRESULT CALLBACK WndProcCommon(bool *quit, HWND hwnd, UINT message,
|
|||||||
mod |= RETROKMOD_META;
|
mod |= RETROKMOD_META;
|
||||||
|
|
||||||
#if _WIN32_WINNT >= 0x0501 /* XP */
|
#if _WIN32_WINNT >= 0x0501 /* XP */
|
||||||
if (settings && string_is_equal(settings->arrays.input_driver, "raw"))
|
if (settings &&
|
||||||
|
string_is_equal(settings->arrays.input_driver, "raw"))
|
||||||
keysym = (unsigned)wparam;
|
keysym = (unsigned)wparam;
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user