mirror of
https://github.com/shadps4-emu/ext-SDL.git
synced 2024-12-04 09:04:32 +00:00
Renamed SDL_HINT_PS2_DYNAMIC_VSYNC SDL_HINT_RENDER_PS2_DYNAMIC_VSYNC
This commit is contained in:
parent
a538936821
commit
9e505252c0
@ -3040,3 +3040,7 @@ typedef SDL_version, SDL_Version;
|
||||
@@
|
||||
- SDL_HINT_LINUX_JOYSTICK_DEADZONES
|
||||
+ SDL_HINT_JOYSTICK_LINUX_DEADZONES
|
||||
@@
|
||||
@@
|
||||
- SDL_HINT_PS2_DYNAMIC_VSYNC
|
||||
+ SDL_HINT_RENDER_PS2_DYNAMIC_VSYNC
|
||||
|
@ -733,6 +733,7 @@ The following hints have been renamed:
|
||||
* SDL_HINT_LINUX_HAT_DEADZONES => SDL_HINT_JOYSTICK_LINUX_HAT_DEADZONES
|
||||
* SDL_HINT_LINUX_JOYSTICK_CLASSIC => SDL_HINT_JOYSTICK_LINUX_CLASSIC
|
||||
* SDL_HINT_LINUX_JOYSTICK_DEADZONES => SDL_HINT_JOYSTICK_LINUX_DEADZONES
|
||||
* SDL_HINT_PS2_DYNAMIC_VSYNC => SDL_HINT_RENDER_PS2_DYNAMIC_VSYNC
|
||||
|
||||
## SDL_init.h
|
||||
|
||||
|
@ -17,7 +17,7 @@ cmake --install build
|
||||
```
|
||||
|
||||
## Hints
|
||||
The PS2 port has a special Hint for having a dynamic VSYNC. The Hint is `SDL_HINT_PS2_DYNAMIC_VSYNC`.
|
||||
The PS2 port has a special Hint for having a dynamic VSYNC. The Hint is `SDL_HINT_RENDER_PS2_DYNAMIC_VSYNC`.
|
||||
If you enabled the dynamic vsync having as well `SDL_RENDERER_PRESENTVSYNC` enabled, then if the app is not able to run at 60 FPS, automatically the `vsync` will be disabled having a better performance, instead of dropping FPS to 30.
|
||||
|
||||
## Notes
|
||||
|
@ -1785,7 +1785,7 @@ extern "C" {
|
||||
*
|
||||
* This hint should be set before creating a renderer.
|
||||
*/
|
||||
#define SDL_HINT_PS2_DYNAMIC_VSYNC "SDL_PS2_DYNAMIC_VSYNC"
|
||||
#define SDL_HINT_RENDER_PS2_DYNAMIC_VSYNC "SDL_RENDER_PS2_DYNAMIC_VSYNC"
|
||||
|
||||
/**
|
||||
* A variable controlling texture scaling quality.
|
||||
|
@ -288,6 +288,7 @@
|
||||
#define SDL_HINT_LINUX_HAT_DEADZONES SDL_HINT_JOYSTICK_LINUX_HAT_DEADZONES
|
||||
#define SDL_HINT_LINUX_JOYSTICK_CLASSIC SDL_HINT_JOYSTICK_LINUX_CLASSIC
|
||||
#define SDL_HINT_LINUX_JOYSTICK_DEADZONES SDL_HINT_JOYSTICK_LINUX_DEADZONES
|
||||
#define SDL_HINT_PS2_DYNAMIC_VSYNC SDL_HINT_RENDER_PS2_DYNAMIC_VSYNC
|
||||
|
||||
/* ##SDL_joystick.h */
|
||||
#define SDL_JOYSTICK_TYPE_GAMECONTROLLER SDL_JOYSTICK_TYPE_GAMEPAD
|
||||
@ -770,6 +771,7 @@
|
||||
#define SDL_HINT_LINUX_HAT_DEADZONES SDL_HINT_LINUX_HAT_DEADZONES_renamed_SDL_HINT_JOYSTICK_LINUX_HAT_DEADZONES
|
||||
#define SDL_HINT_LINUX_JOYSTICK_CLASSIC SDL_HINT_LINUX_JOYSTICK_CLASSIC_renamed_SDL_HINT_JOYSTICK_LINUX_CLASSIC
|
||||
#define SDL_HINT_LINUX_JOYSTICK_DEADZONES SDL_HINT_LINUX_JOYSTICK_DEADZONES_renamed_SDL_HINT_JOYSTICK_LINUX_DEADZONES
|
||||
#define SDL_HINT_PS2_DYNAMIC_VSYNC SDL_HINT_PS2_DYNAMIC_VSYNC_renamed_SDL_HINT_RENDER_PS2_DYNAMIC_VSYNC
|
||||
|
||||
/* ##SDL_joystick.h */
|
||||
#define SDL_JOYSTICK_TYPE_GAMECONTROLLER SDL_JOYSTICK_TYPE_GAMECONTROLLER_renamed_SDL_JOYSTICK_TYPE_GAMEPAD
|
||||
|
@ -612,7 +612,7 @@ static void PS2_DestroyRenderer(SDL_Renderer *renderer)
|
||||
static int PS2_SetVSync(SDL_Renderer *renderer, const int vsync)
|
||||
{
|
||||
PS2_RenderData *data = (PS2_RenderData *)renderer->driverdata;
|
||||
SDL_bool dynamicVsync = SDL_GetHintBoolean(SDL_HINT_PS2_DYNAMIC_VSYNC, SDL_FALSE);
|
||||
SDL_bool dynamicVsync = SDL_GetHintBoolean(SDL_HINT_RENDER_PS2_DYNAMIC_VSYNC, SDL_FALSE);
|
||||
data->vsync = vsync ? (dynamicVsync ? 2 : 1) : 0;
|
||||
return 0;
|
||||
}
|
||||
@ -683,7 +683,7 @@ static SDL_Renderer *PS2_CreateRenderer(SDL_Window *window, SDL_PropertiesID cre
|
||||
gsKit_clear(gsGlobal, GS_BLACK);
|
||||
|
||||
data->gsGlobal = gsGlobal;
|
||||
dynamicVsync = SDL_GetHintBoolean(SDL_HINT_PS2_DYNAMIC_VSYNC, SDL_FALSE);
|
||||
dynamicVsync = SDL_GetHintBoolean(SDL_HINT_RENDER_PS2_DYNAMIC_VSYNC, SDL_FALSE);
|
||||
if (SDL_GetBooleanProperty(create_props, SDL_PROP_RENDERER_CREATE_PRESENT_VSYNC_BOOLEAN, SDL_FALSE)) {
|
||||
data->vsync = (dynamicVsync ? 2 : 1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user