(Win32) Cleanups
This commit is contained in:
parent
7896341dfc
commit
49bf60cc90
File diff suppressed because it is too large
Load Diff
|
@ -40,6 +40,27 @@
|
||||||
#ifndef _XBOX
|
#ifndef _XBOX
|
||||||
#include "../../ui/drivers/ui_win32_resource.h"
|
#include "../../ui/drivers/ui_win32_resource.h"
|
||||||
#include "../../ui/drivers/ui_win32.h"
|
#include "../../ui/drivers/ui_win32.h"
|
||||||
|
|
||||||
|
#if (defined(_MSC_VER) && (_MSC_VER >= 1400)) || defined(__MINGW32__)
|
||||||
|
#ifndef HAVE_CLIP_WINDOW
|
||||||
|
#define HAVE_CLIP_WINDOW
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0500 /* Windows 2000 and higher */
|
||||||
|
|
||||||
|
/* Supports taskbar */
|
||||||
|
#ifndef HAVE_TASKBAR
|
||||||
|
#define HAVE_TASKBAR
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Supports window transparency */
|
||||||
|
#ifndef HAVE_WINDOW_TRANSP
|
||||||
|
#define HAVE_WINDOW_TRANSP
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
RETRO_BEGIN_DECLS
|
RETRO_BEGIN_DECLS
|
||||||
|
@ -78,9 +99,8 @@ void win32_set_style(MONITORINFOEX *current_mon, HMONITOR *hm_to_use,
|
||||||
unsigned *width, unsigned *height, bool fullscreen, bool windowed_full,
|
unsigned *width, unsigned *height, bool fullscreen, bool windowed_full,
|
||||||
RECT *rect, RECT *mon_rect, DWORD *style);
|
RECT *rect, RECT *mon_rect, DWORD *style);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
void win32_monitor_from_window(void);
|
void win32_monitor_from_window(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
void win32_monitor_init(void);
|
void win32_monitor_init(void);
|
||||||
|
|
||||||
|
@ -107,7 +127,9 @@ bool is_running_on_xbox(void);
|
||||||
|
|
||||||
bool win32_has_focus(void *data);
|
bool win32_has_focus(void *data);
|
||||||
|
|
||||||
|
#ifdef HAVE_CLIP_WINDOW
|
||||||
void win32_clip_window(bool grab);
|
void win32_clip_window(bool grab);
|
||||||
|
#endif
|
||||||
|
|
||||||
void win32_check_window(void *data,
|
void win32_check_window(void *data,
|
||||||
bool *quit,
|
bool *quit,
|
||||||
|
@ -177,10 +199,6 @@ bool win32_load_content_from_gui(const char *szFilename);
|
||||||
|
|
||||||
void win32_setup_pixel_format(HDC hdc, bool supports_gl);
|
void win32_setup_pixel_format(HDC hdc, bool supports_gl);
|
||||||
|
|
||||||
void win32_unset_input_userdata(void);
|
|
||||||
|
|
||||||
void win32_set_input_userdata(void *data);
|
|
||||||
|
|
||||||
void win32_update_title(void);
|
void win32_update_title(void);
|
||||||
|
|
||||||
RETRO_END_DECLS
|
RETRO_END_DECLS
|
||||||
|
|
|
@ -59,9 +59,7 @@
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
bool decorations;
|
bool decorations;
|
||||||
int progress;
|
|
||||||
int crt_center;
|
int crt_center;
|
||||||
unsigned opacity;
|
|
||||||
unsigned orig_width;
|
unsigned orig_width;
|
||||||
unsigned orig_height;
|
unsigned orig_height;
|
||||||
unsigned orig_refresh;
|
unsigned orig_refresh;
|
||||||
|
@ -140,13 +138,9 @@ static void win32_display_server_destroy(void *data)
|
||||||
static bool win32_display_server_set_window_opacity(
|
static bool win32_display_server_set_window_opacity(
|
||||||
void *data, unsigned opacity)
|
void *data, unsigned opacity)
|
||||||
{
|
{
|
||||||
|
#ifdef HAVE_WINDOW_TRANSP
|
||||||
HWND hwnd = win32_get_window();
|
HWND hwnd = win32_get_window();
|
||||||
dispserv_win32_t *serv = (dispserv_win32_t*)data;
|
dispserv_win32_t *serv = (dispserv_win32_t*)data;
|
||||||
|
|
||||||
if (serv)
|
|
||||||
serv->opacity = opacity;
|
|
||||||
|
|
||||||
#if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0500
|
|
||||||
/* Set window transparency on Windows 2000 and above */
|
/* Set window transparency on Windows 2000 and above */
|
||||||
if (opacity < 100)
|
if (opacity < 100)
|
||||||
{
|
{
|
||||||
|
@ -175,8 +169,6 @@ static bool win32_display_server_set_window_progress(
|
||||||
if (!serv)
|
if (!serv)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
serv->progress = progress;
|
|
||||||
|
|
||||||
#ifdef HAS_TASKBAR_EXT
|
#ifdef HAS_TASKBAR_EXT
|
||||||
if (!serv->taskbar_list || !win32_taskbar_is_created())
|
if (!serv->taskbar_list || !win32_taskbar_is_created())
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -184,7 +184,7 @@ static void *dinput_init(const char *joypad_driver)
|
||||||
input_keymaps_init_keyboard_lut(rarch_key_map_dinput);
|
input_keymaps_init_keyboard_lut(rarch_key_map_dinput);
|
||||||
|
|
||||||
#ifndef _XBOX
|
#ifndef _XBOX
|
||||||
win32_set_input_userdata(di);
|
SetWindowLongPtr(main_window.hwnd, GWLP_USERDATA, (LONG_PTR)di);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return di;
|
return di;
|
||||||
|
@ -988,7 +988,7 @@ static void dinput_free(void *data)
|
||||||
g_dinput_ctx = NULL;
|
g_dinput_ctx = NULL;
|
||||||
|
|
||||||
#ifndef _XBOX
|
#ifndef _XBOX
|
||||||
win32_unset_input_userdata();
|
SetWindowLongPtr(main_window.hwnd, GWLP_USERDATA, 0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
g_dinput_ctx = hold_ctx;
|
g_dinput_ctx = hold_ctx;
|
||||||
|
|
Loading…
Reference in New Issue