diff --git a/android/app-android.cpp b/android/app-android.cpp index faa4d4494e..a3347bae2e 100644 --- a/android/app-android.cpp +++ b/android/app-android.cpp @@ -31,6 +31,8 @@ static JNIEnv *jniEnvUI; std::string frameCommand; std::string frameCommandParam; +std::string systemName; + const bool extraLog = true; static float left_joystick_x_async; @@ -84,6 +86,10 @@ void System_InputBox(const char *title, const char *defaultValue) { frameCommandParam = title; } +std::string System_GetName() { + return systemName; +} + // Remember that all of these need initialization on init! The process // may be reused when restarting the game. Globals are DANGEROUS. @@ -152,7 +158,7 @@ extern "C" void Java_com_henrikrydgard_libnative_NativeApp_init ILOG("NativeApp::Init: APK path: %s", apkPath.c_str()); VFSRegister("", new ZipAssetReader(apkPath.c_str(), "assets/")); - std::string deviceType = GetJavaString(env, jdevicetype); + systemName = GetJavaString(env, jdevicetype); std::string externalDir = GetJavaString(env, jexternalDir); std::string user_data_path = GetJavaString(env, jdataDir) + "/"; diff --git a/base/NativeApp.h b/base/NativeApp.h index a00d9af144..ca7bdad320 100644 --- a/base/NativeApp.h +++ b/base/NativeApp.h @@ -97,3 +97,4 @@ void LaunchBrowser(const char *url); void LaunchMarket(const char *url); void LaunchEmail(const char *email_address); void System_InputBox(const char *title, const char *defaultValue); +std::string System_GetName(); \ No newline at end of file diff --git a/base/PCMain.cpp b/base/PCMain.cpp index 00ac7fcaf9..7b5598c1da 100644 --- a/base/PCMain.cpp +++ b/base/PCMain.cpp @@ -248,6 +248,11 @@ void LaunchEmail(const char *email_address) #endif } +std::string System_GetName() { + // TODO + return "SDL"; +} + InputState input_state; diff --git a/gfx_es2/gl_state.cpp b/gfx_es2/gl_state.cpp index e0a61f9ddb..5c733d48d0 100644 --- a/gfx_es2/gl_state.cpp +++ b/gfx_es2/gl_state.cpp @@ -82,10 +82,12 @@ void CheckGLExtensions() { memset(&gl_extensions, 0, sizeof(gl_extensions)); const char *extString = (const char *)glGetString(GL_EXTENSIONS); + gl_extensions.all_gl_extensions = extString; #ifdef WIN32 const char *wglString = wglGetExtensionsStringEXT(); gl_extensions.EXT_swap_control_tear = strstr(wglString, "WGL_EXT_swap_control_tear") != 0; + gl_extensions.all_egl_extensions = wglString; #elif !defined(USING_GLES2) // const char *glXString = glXQueryExtensionString(); // gl_extensions.EXT_swap_control_tear = strstr(glXString, "GLX_EXT_swap_control_tear") != 0; @@ -132,6 +134,7 @@ void CheckGLExtensions() { EGLDisplay display = eglGetDisplay(EGL_DEFAULT_DISPLAY); const char *eglString = eglQueryString(display, EGL_EXTENSIONS); + gl_extensions.all_egl_extensions = eglString; gl_extensions.EGL_NV_system_time = strstr(eglString, "EGL_NV_system_time") != 0; gl_extensions.EGL_NV_coverage_sample = strstr(eglString, "EGL_NV_coverage_sample") != 0; diff --git a/gfx_es2/gl_state.h b/gfx_es2/gl_state.h index 1d692435bc..dd20241d4d 100644 --- a/gfx_es2/gl_state.h +++ b/gfx_es2/gl_state.h @@ -270,6 +270,9 @@ struct GLExtensions { bool EGL_NV_system_time; bool EGL_NV_coverage_sample; + + std::string all_gl_extensions; + std::string all_egl_extensions; }; extern GLExtensions gl_extensions; diff --git a/ui/view.cpp b/ui/view.cpp index 5d4f7f265d..29b76848cc 100644 --- a/ui/view.cpp +++ b/ui/view.cpp @@ -304,7 +304,7 @@ void InfoItem::Draw(UIContext &dc) { Item::Draw(dc); int paddingX = 12; dc.Draw()->DrawText(dc.theme->uiFont, text_.c_str(), bounds_.x + paddingX, bounds_.centerY(), 0xFFFFFFFF, ALIGN_VCENTER); - dc.Draw()->DrawText(dc.theme->uiFont, text_.c_str(), bounds_.x2() - paddingX, bounds_.centerY(), 0xFFFFFFFF, ALIGN_VCENTER | ALIGN_RIGHT); + dc.Draw()->DrawText(dc.theme->uiFont, rightText_.c_str(), bounds_.x2() - paddingX, bounds_.centerY(), 0xFFFFFFFF, ALIGN_VCENTER | ALIGN_RIGHT); // dc.Draw()->DrawImageStretch(dc.theme->whiteImage, bounds_.x, bounds_.y, bounds_.x2(), bounds_.y + 2, dc.theme->itemDownStyle.bgColor); }