mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
(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
|
||||
#include "../../ui/drivers/ui_win32_resource.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
|
||||
|
||||
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,
|
||||
RECT *rect, RECT *mon_rect, DWORD *style);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void win32_monitor_from_window(void);
|
||||
#endif
|
||||
|
||||
void win32_monitor_init(void);
|
||||
|
||||
@ -107,7 +127,9 @@ bool is_running_on_xbox(void);
|
||||
|
||||
bool win32_has_focus(void *data);
|
||||
|
||||
#ifdef HAVE_CLIP_WINDOW
|
||||
void win32_clip_window(bool grab);
|
||||
#endif
|
||||
|
||||
void win32_check_window(void *data,
|
||||
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_unset_input_userdata(void);
|
||||
|
||||
void win32_set_input_userdata(void *data);
|
||||
|
||||
void win32_update_title(void);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
@ -59,9 +59,7 @@
|
||||
typedef struct
|
||||
{
|
||||
bool decorations;
|
||||
int progress;
|
||||
int crt_center;
|
||||
unsigned opacity;
|
||||
unsigned orig_width;
|
||||
unsigned orig_height;
|
||||
unsigned orig_refresh;
|
||||
@ -140,13 +138,9 @@ static void win32_display_server_destroy(void *data)
|
||||
static bool win32_display_server_set_window_opacity(
|
||||
void *data, unsigned opacity)
|
||||
{
|
||||
#ifdef HAVE_WINDOW_TRANSP
|
||||
HWND hwnd = win32_get_window();
|
||||
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 */
|
||||
if (opacity < 100)
|
||||
{
|
||||
@ -175,8 +169,6 @@ static bool win32_display_server_set_window_progress(
|
||||
if (!serv)
|
||||
return false;
|
||||
|
||||
serv->progress = progress;
|
||||
|
||||
#ifdef HAS_TASKBAR_EXT
|
||||
if (!serv->taskbar_list || !win32_taskbar_is_created())
|
||||
return false;
|
||||
|
@ -184,7 +184,7 @@ static void *dinput_init(const char *joypad_driver)
|
||||
input_keymaps_init_keyboard_lut(rarch_key_map_dinput);
|
||||
|
||||
#ifndef _XBOX
|
||||
win32_set_input_userdata(di);
|
||||
SetWindowLongPtr(main_window.hwnd, GWLP_USERDATA, (LONG_PTR)di);
|
||||
#endif
|
||||
|
||||
return di;
|
||||
@ -988,7 +988,7 @@ static void dinput_free(void *data)
|
||||
g_dinput_ctx = NULL;
|
||||
|
||||
#ifndef _XBOX
|
||||
win32_unset_input_userdata();
|
||||
SetWindowLongPtr(main_window.hwnd, GWLP_USERDATA, 0);
|
||||
#endif
|
||||
|
||||
g_dinput_ctx = hold_ctx;
|
||||
|
Loading…
x
Reference in New Issue
Block a user