Better screen layout support

This commit is contained in:
wheremyfoodat
2025-07-06 02:41:44 +03:00
parent 1c0f65c740
commit cf321b1ed8
17 changed files with 328 additions and 186 deletions

View File

@@ -10,7 +10,7 @@
#include "PICA/gpu.hpp"
#include "PICA/pica_hash.hpp"
#include "PICA/screen_layout.hpp"
#include "screen_layout.hpp"
#include "SDL_metal.h"
using namespace PICA;
@@ -107,7 +107,9 @@ void RendererMTL::display() {
if (outputSizeChanged) {
outputSizeChanged = false;
ScreenLayout::WindowCoordinates windowCoords;
ScreenLayout::calculateCoordinates(windowCoords, outputWindowWidth, outputWindowHeight, ScreenLayout::Layout::Default);
ScreenLayout::calculateCoordinates(
windowCoords, outputWindowWidth, outputWindowHeight, emulatorConfig->topScreenSize, emulatorConfig->screenLayout
);
blitInfo.topScreenX = float(windowCoords.topScreenX);
blitInfo.topScreenY = float(windowCoords.topScreenY);