mirror of
https://github.com/libretro/RetroArch
synced 2025-03-30 16:20:27 +00:00
Silence some more C89_BUILD warnings
This commit is contained in:
parent
f546020429
commit
ae2435cf16
@ -66,6 +66,7 @@ static void gfx_dwm_shutdown(void)
|
||||
|
||||
static bool gfx_init_dwm(void)
|
||||
{
|
||||
HRESULT (WINAPI *mmcss)(BOOL);
|
||||
static bool inited = false;
|
||||
|
||||
if (inited)
|
||||
@ -89,7 +90,7 @@ static bool gfx_init_dwm(void)
|
||||
DragAcceptFiles_func =
|
||||
(VOID (WINAPI*)(HWND, BOOL))dylib_proc(shell32lib, "DragAcceptFiles");
|
||||
|
||||
HRESULT (WINAPI *mmcss)(BOOL) =
|
||||
mmcss =
|
||||
(HRESULT (WINAPI*)(BOOL))dylib_proc(dwmlib, "DwmEnableMMCSS");
|
||||
if (mmcss)
|
||||
{
|
||||
@ -104,6 +105,7 @@ static bool gfx_init_dwm(void)
|
||||
static void gfx_set_dwm(void)
|
||||
{
|
||||
HRESULT ret;
|
||||
HRESULT (WINAPI *composition_enable)(UINT);
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (!gfx_init_dwm())
|
||||
@ -112,7 +114,7 @@ static void gfx_set_dwm(void)
|
||||
if (settings->bools.video_disable_composition == dwm_composition_disabled)
|
||||
return;
|
||||
|
||||
HRESULT (WINAPI *composition_enable)(UINT) =
|
||||
composition_enable =
|
||||
(HRESULT (WINAPI*)(UINT))dylib_proc(dwmlib, "DwmEnableComposition");
|
||||
if (!composition_enable)
|
||||
{
|
||||
|
@ -205,9 +205,12 @@ static BOOL CALLBACK win32_monitor_enum_proc(HMONITOR hMonitor,
|
||||
void win32_monitor_from_window(void)
|
||||
{
|
||||
#ifndef _XBOX
|
||||
ui_window_t *window = NULL;
|
||||
|
||||
win32_monitor_last =
|
||||
MonitorFromWindow(main_window.hwnd, MONITOR_DEFAULTTONEAREST);
|
||||
const ui_window_t *window = ui_companion_driver_get_window_ptr();
|
||||
|
||||
window = (ui_window_t*)ui_companion_driver_get_window_ptr();
|
||||
|
||||
if (window)
|
||||
window->destroy(&main_window);
|
||||
|
@ -435,9 +435,10 @@ static void gfx_ctx_wgl_update_title(void *data, void *data2)
|
||||
static void gfx_ctx_wgl_get_video_size(void *data,
|
||||
unsigned *width, unsigned *height)
|
||||
{
|
||||
(void)data;
|
||||
HWND window = win32_get_window();
|
||||
|
||||
(void)data;
|
||||
|
||||
if (!window)
|
||||
{
|
||||
RECT mon_rect;
|
||||
|
@ -222,6 +222,8 @@ static void dinput_poll(void *data)
|
||||
if (di->mouse)
|
||||
{
|
||||
DIMOUSESTATE2 mouse_state;
|
||||
POINT point = {0};
|
||||
|
||||
memset(&mouse_state, 0, sizeof(mouse_state));
|
||||
|
||||
if (FAILED(IDirectInputDevice8_GetDeviceState(
|
||||
@ -237,8 +239,8 @@ static void dinput_poll(void *data)
|
||||
di->mouse_rel_y = mouse_state.lY;
|
||||
|
||||
|
||||
if (!mouse_state.rgbButtons[0])
|
||||
unset_doubleclick_on_titlebar();
|
||||
if (!mouse_state.rgbButtons[0])
|
||||
unset_doubleclick_on_titlebar();
|
||||
if (doubleclick_on_titlebar_pressed())
|
||||
di->mouse_l = 0;
|
||||
else
|
||||
@ -248,7 +250,6 @@ static void dinput_poll(void *data)
|
||||
|
||||
/* No simple way to get absolute coordinates
|
||||
* for RETRO_DEVICE_POINTER. Just use Win32 APIs. */
|
||||
POINT point = {0};
|
||||
GetCursorPos(&point);
|
||||
ScreenToClient((HWND)video_driver_window_get(), &point);
|
||||
di->mouse_x = point.x;
|
||||
|
@ -375,11 +375,11 @@ static bool xinput_joypad_button(unsigned port_num, uint16_t joykey)
|
||||
static int16_t xinput_joypad_axis (unsigned port_num, uint32_t joyaxis)
|
||||
{
|
||||
int xuser;
|
||||
int16_t val = 0;
|
||||
int axis = -1;
|
||||
|
||||
bool is_neg = false;
|
||||
bool is_pos = false;
|
||||
int16_t val = 0;
|
||||
int axis = -1;
|
||||
bool is_neg = false;
|
||||
bool is_pos = false;
|
||||
XINPUT_GAMEPAD* pad = NULL;
|
||||
|
||||
if (joyaxis == AXIS_NONE)
|
||||
return 0;
|
||||
@ -404,7 +404,7 @@ static int16_t xinput_joypad_axis (unsigned port_num, uint32_t joyaxis)
|
||||
is_pos = true;
|
||||
}
|
||||
|
||||
XINPUT_GAMEPAD* pad = &(g_xinput_states[xuser].xstate.Gamepad);
|
||||
pad = &(g_xinput_states[xuser].xstate.Gamepad);
|
||||
|
||||
switch (axis)
|
||||
{
|
||||
|
@ -530,12 +530,14 @@ static bool _scond_wait_win32(scond_t *cond, slock_t *lock, DWORD dwMilliseconds
|
||||
{
|
||||
#if _WIN32_WINNT >= 0x0500
|
||||
LARGE_INTEGER now;
|
||||
LONGLONG elapsed;
|
||||
|
||||
QueryPerformanceCounter(&now);
|
||||
LONGLONG elapsed = now.QuadPart - tsBegin.QuadPart;
|
||||
elapsed = now.QuadPart - tsBegin.QuadPart;
|
||||
elapsed *= 1000;
|
||||
elapsed /= performanceCounterFrequency.QuadPart;
|
||||
#else
|
||||
DWORD now = timeGetTime();
|
||||
DWORD now = timeGetTime();
|
||||
DWORD elapsed = now - tsBegin;
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user