From 805c2ad529f2637b51c45c1b8329ea3065e767bd Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 10 Aug 2017 21:22:30 +0200 Subject: [PATCH] Buildfixes --- audio/drivers/dsound.c | 2 +- input/drivers_joypad/dinput_joypad.c | 8 ++++---- input/input_overlay.c | 7 ++++--- ui/drivers/ui_win32.c | 2 +- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/audio/drivers/dsound.c b/audio/drivers/dsound.c index 2f0acb88b1..6d82972144 100644 --- a/audio/drivers/dsound.c +++ b/audio/drivers/dsound.c @@ -322,7 +322,7 @@ static void *dsound_init(const char *device, unsigned rate, unsigned latency, RARCH_LOG("DirectSound devices:\n"); #ifndef _XBOX - DirectSoundEnumerate(enumerate_cb, &dev); + DirectSoundEnumerate((LPDSENUMCALLBACKW)enumerate_cb, &dev); #endif if (DirectSoundCreate(dev.guid, &ds->ds, NULL) != DS_OK) diff --git a/input/drivers_joypad/dinput_joypad.c b/input/drivers_joypad/dinput_joypad.c index fb02db9a8a..7541cf0dbb 100644 --- a/input/drivers_joypad/dinput_joypad.c +++ b/input/drivers_joypad/dinput_joypad.c @@ -225,8 +225,8 @@ static BOOL CALLBACK enum_joypad_cb(const DIDEVICEINSTANCE *inst, void *p) #endif return DIENUM_CONTINUE; - g_pads[g_joypad_cnt].joy_name = strdup(inst->tszProductName); - g_pads[g_joypad_cnt].joy_friendly_name = strdup(inst->tszInstanceName); + g_pads[g_joypad_cnt].joy_name = strdup((const char*)inst->tszProductName); + g_pads[g_joypad_cnt].joy_friendly_name = strdup((const char*)inst->tszInstanceName); /* there may be more useful info in the GUID so leave this here for a while */ #if 0 @@ -294,8 +294,8 @@ static bool dinput_joypad_init(void *data) for (i = 0; i < MAX_USERS; ++i) { - g_xinput_pad_indexes[i] = -1; - g_pads[i].joy_name = NULL; + g_xinput_pad_indexes[i] = -1; + g_pads[i].joy_name = NULL; g_pads[i].joy_friendly_name = NULL; } diff --git a/input/input_overlay.c b/input/input_overlay.c index f67a8432ac..94611c110c 100644 --- a/input/input_overlay.c +++ b/input/input_overlay.c @@ -761,12 +761,13 @@ void input_state_overlay(input_overlay_t *ol, int16_t *ret, static bool input_overlay_add_inputs(input_overlay_t *ol, unsigned port, unsigned analog_dpad_mode) { - int i; + unsigned i; uint64_t mask; int id; - bool button_pressed = false; - bool current_button_pressed; + bool button_pressed = false; + bool current_button_pressed = false; input_overlay_state_t *ol_state = &ol->overlay_state; + if(!ol_state) return false; diff --git a/ui/drivers/ui_win32.c b/ui/drivers/ui_win32.c index e5943ec2b2..116c7844e6 100644 --- a/ui/drivers/ui_win32.c +++ b/ui/drivers/ui_win32.c @@ -286,7 +286,7 @@ void shader_dlg_params_reload(void) SendMessage(control->trackbar.label_title, WM_SETFONT, (WPARAM)hFont, MAKELPARAM(TRUE, 0)); pos_y += SHADER_DLG_LABEL_HEIGHT; - control->trackbar.hwnd = CreateWindowEx(0, TRACKBAR_CLASS, "", + control->trackbar.hwnd = CreateWindowEx(0, (LPCSTR)TRACKBAR_CLASS, "", WS_CHILD | WS_VISIBLE | TBS_HORZ | TBS_NOTICKS, pos_x + SHADER_DLG_TRACKBAR_LABEL_WIDTH, pos_y, SHADER_DLG_TRACKBAR_WIDTH, SHADER_DLG_TRACKBAR_HEIGHT,