mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 05:19:56 +00:00
Fix blackscreen, better debug print of display parameters
This commit is contained in:
parent
ca8af6f4c7
commit
3aa0a9e17b
@ -1,3 +1,5 @@
|
||||
#include <cstdio>
|
||||
|
||||
#include "Common/System/Display.h"
|
||||
#include "Common/Math/math_util.h"
|
||||
|
||||
@ -46,3 +48,21 @@ void RotateRectToDisplay(DisplayRect<int> &rect, int curRTWidth, int curRTHeight
|
||||
void RotateRectToDisplay(DisplayRect<float> &rect, float curRTWidth, float curRTHeight) {
|
||||
RotateRectToDisplayImpl<float>(rect, curRTWidth, curRTHeight);
|
||||
}
|
||||
|
||||
DisplayProperties::DisplayProperties() {
|
||||
rot_matrix.setIdentity();
|
||||
}
|
||||
|
||||
void DisplayProperties::Print() {
|
||||
printf("dp_xres/yres: %d, %d\n", dp_xres, dp_yres);
|
||||
printf("pixel_xres/yres: %d, %d\n", pixel_xres, pixel_yres);
|
||||
|
||||
printf("dpi, x, y: %f, %f, %f\n", dpi, dpi_scale_x, dpi_scale_y);
|
||||
printf("pixel_in_dps: %f, %f\n", pixel_in_dps_x, pixel_in_dps_y);
|
||||
|
||||
printf("dpi_real: %f, %f\n", dpi_scale_real_x, dpi_scale_real_y);
|
||||
printf("display_hz: %f\n", display_hz);
|
||||
|
||||
printf("rotation: %d\n", rotation);
|
||||
rot_matrix.print();
|
||||
}
|
||||
|
@ -36,6 +36,9 @@ struct DisplayProperties {
|
||||
|
||||
DisplayRotation rotation;
|
||||
Lin::Matrix4x4 rot_matrix;
|
||||
|
||||
DisplayProperties();
|
||||
void Print();
|
||||
};
|
||||
|
||||
extern DisplayProperties g_display;
|
||||
|
@ -751,9 +751,7 @@ int main(int argc, char *argv[]) {
|
||||
g_display.dpi_scale_y = g_display.dp_yres / (float)g_display.pixel_yres;
|
||||
g_display.dpi_scale_real_x = g_display.dpi_scale_x;
|
||||
g_display.dpi_scale_real_y = g_display.dpi_scale_y;
|
||||
|
||||
printf("Pixels: %i x %i\n", g_display.pixel_xres, g_display.pixel_yres);
|
||||
printf("Virtual pixels: %i x %i\n", g_display.dp_xres, g_display.dp_yres);
|
||||
g_display.Print();
|
||||
|
||||
GraphicsContext *graphicsContext = nullptr;
|
||||
SDL_Window *window = nullptr;
|
||||
|
Loading…
Reference in New Issue
Block a user