mirror of
https://github.com/libretro/RetroArch
synced 2025-03-30 16:20:27 +00:00
Doubleclick on titlebar should no longer trigger button press
in RA window
This commit is contained in:
parent
616b9f7471
commit
ce6f3f955c
@ -50,8 +50,7 @@ LRESULT win32_menu_loop(HWND owner, WPARAM wparam);
|
||||
|
||||
extern "C" bool dinput_handle_message(void *dinput, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
extern "C" bool doubleclick_on_titlebar;
|
||||
|
||||
bool doubleclick_on_titlebar = false;
|
||||
unsigned g_resize_width;
|
||||
unsigned g_resize_height;
|
||||
bool g_restore_desktop;
|
||||
@ -78,6 +77,19 @@ static HMONITOR win32_monitor_last;
|
||||
static unsigned win32_monitor_count;
|
||||
static HMONITOR win32_monitor_all[MAX_MONITORS];
|
||||
|
||||
extern "C"
|
||||
{
|
||||
bool doubleclick_on_titlebar_pressed(void)
|
||||
{
|
||||
return doubleclick_on_titlebar;
|
||||
}
|
||||
|
||||
void unset_doubleclick_on_titlebar(void)
|
||||
{
|
||||
doubleclick_on_titlebar = false;
|
||||
}
|
||||
};
|
||||
|
||||
INT_PTR CALLBACK PickCoreProc(HWND hDlg, UINT message,
|
||||
WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
@ -301,8 +313,6 @@ static LRESULT CALLBACK WndProcCommon(bool *quit, HWND hwnd, UINT message,
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
doubleclick_on_titlebar = false;
|
||||
|
||||
if (message == WM_NCLBUTTONDBLCLK)
|
||||
doubleclick_on_titlebar = true;
|
||||
|
||||
@ -364,8 +374,6 @@ LRESULT CALLBACK WndProcD3D(HWND hwnd, UINT message,
|
||||
LRESULT ret;
|
||||
bool quit = false;
|
||||
|
||||
doubleclick_on_titlebar = false;
|
||||
|
||||
if (message == WM_NCLBUTTONDBLCLK)
|
||||
doubleclick_on_titlebar = true;
|
||||
|
||||
@ -414,8 +422,6 @@ LRESULT CALLBACK WndProcGL(HWND hwnd, UINT message,
|
||||
bool quit = false;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
doubleclick_on_titlebar = false;
|
||||
|
||||
if (message == WM_NCLBUTTONDBLCLK)
|
||||
doubleclick_on_titlebar = true;
|
||||
|
||||
|
@ -181,7 +181,8 @@ static void *dinput_init(void)
|
||||
return di;
|
||||
}
|
||||
|
||||
extern bool doubleclick_on_titlebar;
|
||||
extern "C" bool doubleclick_on_titlebar_pressed(void);
|
||||
extern "C" void unset_doubleclick_on_titlebar(void);
|
||||
|
||||
static void dinput_poll(void *data)
|
||||
{
|
||||
@ -220,7 +221,12 @@ static void dinput_poll(void *data)
|
||||
di->mouse_x = di->window_pos_x;
|
||||
di->mouse_y = di->window_pos_y;
|
||||
|
||||
if (!doubleclick_on_titlebar)
|
||||
if (doubleclick_on_titlebar_pressed())
|
||||
{
|
||||
di->mouse_l = 0;
|
||||
unset_doubleclick_on_titlebar();
|
||||
}
|
||||
else
|
||||
di->mouse_l = mouse_state.rgbButtons[0];
|
||||
di->mouse_r = mouse_state.rgbButtons[1];
|
||||
di->mouse_m = mouse_state.rgbButtons[2];
|
||||
|
Loading…
x
Reference in New Issue
Block a user