mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-29 01:03:41 +01:00
Wrap the display globals in a struct (#16998)
* Wrap the display globals in a struct Makes it easier to search/replace these, for future refactorings. * Some renaming * Qt buildfix, also fix the Qt build on Mac (got broken with battery changes) * Attempt at buildfixing ios * UWP buildfix
This commit is contained in:
1 parent
3e98d313a8
commit
8b431b39ba
48 files changed
+319
-313
No files matched your search
+11
-11
@@ -311,16 +311,16 @@ void EmuScreen::bootGame(const Path &filename) {
|
||||
coreParam.headLess = false;
|
||||
|
||||
if (g_Config.iInternalResolution == 0) {
|
||||
coreParam.renderWidth = pixel_xres;
|
||||
coreParam.renderHeight = pixel_yres;
|
||||
coreParam.renderWidth = g_display.pixel_xres;
|
||||
coreParam.renderHeight = g_display.pixel_yres;
|
||||
} else {
|
||||
if (g_Config.iInternalResolution < 0)
|
||||
g_Config.iInternalResolution = 1;
|
||||
coreParam.renderWidth = 480 * g_Config.iInternalResolution;
|
||||
coreParam.renderHeight = 272 * g_Config.iInternalResolution;
|
||||
}
|
||||
coreParam.pixelWidth = pixel_xres;
|
||||
coreParam.pixelHeight = pixel_yres;
|
||||
coreParam.pixelWidth = g_display.pixel_xres;
|
||||
coreParam.pixelHeight = g_display.pixel_yres;
|
||||
|
||||
std::string error_string;
|
||||
if (!PSP_InitStart(coreParam, &error_string)) {
|
||||
@@ -1027,8 +1027,8 @@ void EmuScreen::update() {
|
||||
|
||||
#ifndef _WIN32
|
||||
const Bounds &bounds = screenManager()->getUIContext()->GetBounds();
|
||||
PSP_CoreParameter().pixelWidth = pixel_xres * bounds.w / dp_xres;
|
||||
PSP_CoreParameter().pixelHeight = pixel_yres * bounds.h / dp_yres;
|
||||
PSP_CoreParameter().pixelWidth = g_display.pixel_xres * bounds.w / g_display.dp_xres;
|
||||
PSP_CoreParameter().pixelHeight = g_display.pixel_yres * bounds.h / g_display.dp_yres;
|
||||
#endif
|
||||
|
||||
if (!invalid_) {
|
||||
@@ -1371,13 +1371,13 @@ void EmuScreen::preRender() {
|
||||
Viewport viewport;
|
||||
viewport.TopLeftX = 0;
|
||||
viewport.TopLeftY = 0;
|
||||
viewport.Width = pixel_xres;
|
||||
viewport.Height = pixel_yres;
|
||||
viewport.Width = g_display.pixel_xres;
|
||||
viewport.Height = g_display.pixel_yres;
|
||||
viewport.MaxDepth = 1.0;
|
||||
viewport.MinDepth = 0.0;
|
||||
draw->SetViewport(viewport);
|
||||
}
|
||||
draw->SetTargetSize(pixel_xres, pixel_yres);
|
||||
draw->SetTargetSize(g_display.pixel_xres, g_display.pixel_yres);
|
||||
}
|
||||
|
||||
void EmuScreen::postRender() {
|
||||
@@ -1519,8 +1519,8 @@ void EmuScreen::renderUI() {
|
||||
Viewport viewport;
|
||||
viewport.TopLeftX = 0;
|
||||
viewport.TopLeftY = 0;
|
||||
viewport.Width = pixel_xres;
|
||||
viewport.Height = pixel_yres;
|
||||
viewport.Width = g_display.pixel_xres;
|
||||
viewport.Height = g_display.pixel_yres;
|
||||
viewport.MaxDepth = 1.0;
|
||||
viewport.MinDepth = 0.0;
|
||||
thin3d->SetViewport(viewport);
|
||||
|
||||
Reference in new issue
Block a user