(Win32) Test
This commit is contained in:
parent
9fe2ae4a0a
commit
616b9f7471
|
@ -50,6 +50,8 @@ 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;
|
||||
|
||||
unsigned g_resize_width;
|
||||
unsigned g_resize_height;
|
||||
bool g_restore_desktop;
|
||||
|
@ -299,6 +301,11 @@ 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;
|
||||
|
||||
switch (message)
|
||||
{
|
||||
case WM_SYSCOMMAND:
|
||||
|
@ -357,6 +364,11 @@ LRESULT CALLBACK WndProcD3D(HWND hwnd, UINT message,
|
|||
LRESULT ret;
|
||||
bool quit = false;
|
||||
|
||||
doubleclick_on_titlebar = false;
|
||||
|
||||
if (message == WM_NCLBUTTONDBLCLK)
|
||||
doubleclick_on_titlebar = true;
|
||||
|
||||
switch (message)
|
||||
{
|
||||
case WM_DROPFILES:
|
||||
|
@ -402,6 +414,11 @@ 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;
|
||||
|
||||
switch (message)
|
||||
{
|
||||
case WM_DROPFILES:
|
||||
|
|
|
@ -181,6 +181,8 @@ static void *dinput_init(void)
|
|||
return di;
|
||||
}
|
||||
|
||||
extern bool doubleclick_on_titlebar;
|
||||
|
||||
static void dinput_poll(void *data)
|
||||
{
|
||||
struct dinput_input *di = (struct dinput_input*)data;
|
||||
|
@ -218,9 +220,10 @@ static void dinput_poll(void *data)
|
|||
di->mouse_x = di->window_pos_x;
|
||||
di->mouse_y = di->window_pos_y;
|
||||
|
||||
di->mouse_l = mouse_state.rgbButtons[0];
|
||||
di->mouse_r = mouse_state.rgbButtons[1];
|
||||
di->mouse_m = mouse_state.rgbButtons[2];
|
||||
if (!doubleclick_on_titlebar)
|
||||
di->mouse_l = mouse_state.rgbButtons[0];
|
||||
di->mouse_r = mouse_state.rgbButtons[1];
|
||||
di->mouse_m = mouse_state.rgbButtons[2];
|
||||
|
||||
/* No simple way to get absolute coordinates
|
||||
* for RETRO_DEVICE_POINTER. Just use Win32 APIs. */
|
||||
|
|
Loading…
Reference in New Issue