Permalink
Browse files

Review fixes, thanks unknown

  • Loading branch information...
hrydgard committed Aug 8, 2017
1 parent bf91f67 commit 6ee8cb5f2e9a27b5b6cc25b4f2ecbe0a6d6e662c
View
@@ -284,7 +284,7 @@ void PPSSPP_UWPMain::OnTouchEvent(int touchEvent, int touchId, float x, float y,
// We get the coordinate in Windows' device independent pixels already. So let's undo that,
// and then apply our own "dpi".
float dpiFactor_x = m_deviceResources->GetActualDpi() / 96.0f;
float dpiFactor_y = dpiFactor_x;
float dpiFactor_y = dpiFactor_x;
dpiFactor_x /= pixel_in_dps_x;
dpiFactor_y /= pixel_in_dps_y;
@@ -45,12 +45,12 @@ CtrlDisplayListView::CtrlDisplayListView(HWND _wnd)
instructionSize = 4;
// In small window mode, g_dpi_scal may have been adjusted.
// In small window mode, g_dpi_scale may have been adjusted.
const float fontScale = 1.0f / g_dpi_scale_real_y;
int fontHeight = g_Config.iFontHeight * fontScale;
int charWidth = g_Config.iFontWidth * fontScale;
rowHeight = fontHeight +2;
rowHeight = fontHeight + 2;
font = CreateFont(fontHeight,charWidth,0,0,FW_DONTCARE,FALSE,FALSE,FALSE,DEFAULT_CHARSET,OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,DEFAULT_PITCH,
L"Lucida Console");
@@ -698,33 +698,6 @@ extern "C" void Java_org_ppsspp_ppsspp_NativeRenderer_displayInit(JNIEnv * env,
NativeMessageReceived("recreateviews", "");
}
// JavaEGL
extern "C" void Java_org_ppsspp_ppsspp_NativeRenderer_displayResize(JNIEnv *, jobject clazz, jint w, jint h, jint dpi, jfloat refreshRate) {
ILOG("NativeApp.displayResize(%i x %i, dpi=%i, refresh=%0.2f)", w, h, dpi, refreshRate);
pixel_xres = w;
pixel_yres = h;
g_dpi = display_dpi_x;
g_dpi_scale_x = 240.0f / g_dpi;
g_dpi_scale_y = 240.0f / g_dpi;
g_dpi_scale_real_x = g_dpi_scale_x;
g_dpi_scale_real_y = g_dpi_scale_y;
dp_xres = display_xres * g_dpi_scale_x;
dp_yres = display_yres * g_dpi_scale_y;
// Touch scaling is from display pixels to dp pixels.
dp_xscale = (float)dp_xres / (float)display_xres;
dp_yscale = (float)dp_yres / (float)display_yres;
pixel_in_dps_x = (float)pixel_xres / dp_xres;
pixel_in_dps_y = (float)pixel_yres / dp_yres;
NativeResized();
}
extern "C" void JNICALL Java_org_ppsspp_ppsspp_NativeApp_backbufferResize(JNIEnv *, jclass, jint bufw, jint bufh, jint format) {
ILOG("NativeApp.backbufferResize(%d x %d)", bufw, bufh);
@@ -34,7 +34,7 @@ void TextDrawer::SetFontScale(float xscale, float yscale) {
}
float TextDrawer::CalculateDPIScale() {
float scale = g_dpi_scale_x;
float scale = g_dpi_scale_y;
if (scale >= 1.0f) {
scale = 1.0f;
}

0 comments on commit 6ee8cb5

Please sign in to comment.