|
@@ -64,6 +64,8 @@ extern int Android_GLES_LoadLibrary(_THIS, const char *path);
|
|
int Android_ScreenWidth = 0;
|
|
int Android_ScreenWidth = 0;
|
|
int Android_ScreenHeight = 0;
|
|
int Android_ScreenHeight = 0;
|
|
Uint32 Android_ScreenFormat = SDL_PIXELFORMAT_UNKNOWN;
|
|
Uint32 Android_ScreenFormat = SDL_PIXELFORMAT_UNKNOWN;
|
|
|
|
+int Android_ScreenRate = 0;
|
|
|
|
+
|
|
SDL_sem *Android_PauseSem = NULL, *Android_ResumeSem = NULL;
|
|
SDL_sem *Android_PauseSem = NULL, *Android_ResumeSem = NULL;
|
|
|
|
|
|
/* Currently only one window */
|
|
/* Currently only one window */
|
|
@@ -166,7 +168,7 @@ Android_VideoInit(_THIS)
|
|
mode.format = Android_ScreenFormat;
|
|
mode.format = Android_ScreenFormat;
|
|
mode.w = Android_ScreenWidth;
|
|
mode.w = Android_ScreenWidth;
|
|
mode.h = Android_ScreenHeight;
|
|
mode.h = Android_ScreenHeight;
|
|
- mode.refresh_rate = 0;
|
|
|
|
|
|
+ mode.refresh_rate = Android_ScreenRate;
|
|
mode.driverdata = NULL;
|
|
mode.driverdata = NULL;
|
|
if (SDL_AddBasicVideoDisplay(&mode) < 0) {
|
|
if (SDL_AddBasicVideoDisplay(&mode) < 0) {
|
|
return -1;
|
|
return -1;
|
|
@@ -189,11 +191,12 @@ Android_VideoQuit(_THIS)
|
|
|
|
|
|
/* This function gets called before VideoInit() */
|
|
/* This function gets called before VideoInit() */
|
|
void
|
|
void
|
|
-Android_SetScreenResolution(int width, int height, Uint32 format)
|
|
|
|
|
|
+Android_SetScreenResolution(int width, int height, Uint32 format, float rate)
|
|
{
|
|
{
|
|
Android_ScreenWidth = width;
|
|
Android_ScreenWidth = width;
|
|
Android_ScreenHeight = height;
|
|
Android_ScreenHeight = height;
|
|
Android_ScreenFormat = format;
|
|
Android_ScreenFormat = format;
|
|
|
|
+ Android_ScreenRate = rate;
|
|
|
|
|
|
if (Android_Window) {
|
|
if (Android_Window) {
|
|
SDL_SendWindowEvent(Android_Window, SDL_WINDOWEVENT_RESIZED, width, height);
|
|
SDL_SendWindowEvent(Android_Window, SDL_WINDOWEVENT_RESIZED, width, height);
|