Cleanup (nw)

This commit is contained in:
Miodrag Milanovic 2016-11-11 09:50:32 +01:00
parent 46fa51e60e
commit dac02ddf8e
3 changed files with 6 additions and 48 deletions

View File

@ -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"

View File

@ -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)

View File

@ -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;
};