diff --git a/gfx/drivers/gl.c b/gfx/drivers/gl.c index d870d98fb0..b7d2f25da8 100644 --- a/gfx/drivers/gl.c +++ b/gfx/drivers/gl.c @@ -367,10 +367,11 @@ static void gl_set_viewport_wrapper(void *data, unsigned viewport_width, unsigned viewport_height, bool force_full, bool allow_rotate) { video_frame_info_t video_info; + gl_t *gl = (gl_t*)data; video_driver_build_info(&video_info); - gl_set_viewport(data, &video_info, + gl_set_viewport(gl, &video_info, viewport_width, viewport_height, force_full, allow_rotate); } diff --git a/input/drivers_joypad/dinput_joypad.c b/input/drivers_joypad/dinput_joypad.c index 6535e1a34d..c58a5591f8 100644 --- a/input/drivers_joypad/dinput_joypad.c +++ b/input/drivers_joypad/dinput_joypad.c @@ -160,15 +160,27 @@ static void dinput_create_rumble_effects(struct dinput_joypad_data *pad) pad->rumble_props.rgdwAxes = &axis; pad->rumble_props.rglDirection = &direction; +#ifdef __cplusplus + if (IDirectInputDevice8_CreateEffect(pad->joypad, GUID_ConstantForce, + &pad->rumble_props, &pad->rumble_iface[0], NULL) != DI_OK) + RARCH_WARN("[DINPUT]: Strong rumble unavailable.\n"); +#else if (IDirectInputDevice8_CreateEffect(pad->joypad, &GUID_ConstantForce, &pad->rumble_props, &pad->rumble_iface[0], NULL) != DI_OK) RARCH_WARN("[DINPUT]: Strong rumble unavailable.\n"); +#endif axis = DIJOFS_Y; +#ifdef __cplusplus + if (IDirectInputDevice8_CreateEffect(pad->joypad, GUID_ConstantForce, + &pad->rumble_props, &pad->rumble_iface[1], NULL) != DI_OK) + RARCH_WARN("[DINPUT]: Weak rumble unavailable.\n"); +#else if (IDirectInputDevice8_CreateEffect(pad->joypad, &GUID_ConstantForce, &pad->rumble_props, &pad->rumble_iface[1], NULL) != DI_OK) RARCH_WARN("[DINPUT]: Weak rumble unavailable.\n"); +#endif } static BOOL CALLBACK enum_axes_cb(