mirror of
https://github.com/holub/mame
synced 2025-04-25 09:50:04 +03:00
Cleanup (nw)
This commit is contained in:
parent
46fa51e60e
commit
dac02ddf8e
@ -2,12 +2,12 @@
|
||||
// copyright-holders:Aaron Giles
|
||||
//============================================================
|
||||
//
|
||||
// video.h - Win32 implementation of MAME video routines
|
||||
// video.h - UWP implementation of MAME video routines
|
||||
//
|
||||
//============================================================
|
||||
|
||||
#ifndef __WIN_VIDEO__
|
||||
#define __WIN_VIDEO__
|
||||
#ifndef __UWP_VIDEO__
|
||||
#define __UWP_VIDEO__
|
||||
|
||||
#include "modules/osdhelper.h"
|
||||
|
||||
|
@ -275,44 +275,6 @@ uwp_window_info::uwp_window_info(
|
||||
|
||||
POINT uwp_window_info::s_saved_cursor_pos = { -1, -1 };
|
||||
|
||||
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
|
||||
|
||||
void uwp_window_info::capture_pointer()
|
||||
{
|
||||
RECT bounds;
|
||||
GetClientRect(platform_window<HWND>(), &bounds);
|
||||
ClientToScreen(platform_window<HWND>(), &reinterpret_cast<POINT *>(&bounds)[0]);
|
||||
ClientToScreen(platform_window<HWND>(), &reinterpret_cast<POINT *>(&bounds)[1]);
|
||||
ClipCursor(&bounds);
|
||||
}
|
||||
|
||||
void uwp_window_info::release_pointer()
|
||||
{
|
||||
ClipCursor(nullptr);
|
||||
}
|
||||
|
||||
void uwp_window_info::hide_pointer()
|
||||
{
|
||||
GetCursorPos(&s_saved_cursor_pos);
|
||||
|
||||
while (ShowCursor(FALSE) >= -1) {};
|
||||
ShowCursor(TRUE);
|
||||
}
|
||||
|
||||
void uwp_window_info::show_pointer()
|
||||
{
|
||||
if (s_saved_cursor_pos.x != -1 || s_saved_cursor_pos.y != -1)
|
||||
{
|
||||
SetCursorPos(s_saved_cursor_pos.x, s_saved_cursor_pos.y);
|
||||
s_saved_cursor_pos.x = s_saved_cursor_pos.y = -1;
|
||||
}
|
||||
|
||||
while (ShowCursor(TRUE) < 1) {};
|
||||
ShowCursor(FALSE);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
CoreCursor^ uwp_window_info::s_cursor = nullptr;
|
||||
|
||||
void uwp_window_info::capture_pointer()
|
||||
@ -338,8 +300,6 @@ void uwp_window_info::show_pointer()
|
||||
window->PointerCursor = uwp_window_info::s_cursor;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
//============================================================
|
||||
// winwindow_process_events_periodic
|
||||
// (main thread)
|
||||
|
@ -2,12 +2,12 @@
|
||||
// copyright-holders:Aaron Giles, Brad Hughes
|
||||
//============================================================
|
||||
//
|
||||
// window.h - Win32 window handling
|
||||
// window.h - UWP window handling
|
||||
//
|
||||
//============================================================
|
||||
|
||||
#ifndef __WIN_WINDOW__
|
||||
#define __WIN_WINDOW__
|
||||
#ifndef __UWP_WINDOW__
|
||||
#define __UWP_WINDOW__
|
||||
|
||||
// standard windows headers
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
@ -140,9 +140,7 @@ private:
|
||||
|
||||
static POINT s_saved_cursor_pos;
|
||||
|
||||
#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
|
||||
static Windows::UI::Core::CoreCursor^ s_cursor;
|
||||
#endif
|
||||
|
||||
running_machine & m_machine;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user