diff --git a/macos/config/steam_appid.txt b/macos/config/steam_appid.txt index dd4b89a9..3801fbf5 100644 --- a/macos/config/steam_appid.txt +++ b/macos/config/steam_appid.txt @@ -1 +1 @@ -235900 +1488200 diff --git a/macos/config/steamshim.xcconfig b/macos/config/steamshim.xcconfig index c945c2fa..051c53c1 100644 --- a/macos/config/steamshim.xcconfig +++ b/macos/config/steamshim.xcconfig @@ -7,6 +7,7 @@ // If this is set to anything but 0, steamshim will use RestartAppIfNecessary instead of requiring // a steam_appid.txt +//STEAM_APP_ID = 1488200 STEAM_APP_ID = 0 STEAMSHIM_DEFINES = "GAME_LAUNCH_NAME=\"Z-steam\"" STEAM_APPID=$(STEAM_APP_ID) diff --git a/src/display/graphics.cpp b/src/display/graphics.cpp index 3ead5a03..d54b2bde 100644 --- a/src/display/graphics.cpp +++ b/src/display/graphics.cpp @@ -748,6 +748,8 @@ struct GraphicsPrivate { TEXFBO frozenScene; Quad screenQuad; + float backingScaleFactor; + Vec2i integerScaleFactor; TEXFBO integerScaleBuffer; bool integerScaleActive; @@ -770,7 +772,7 @@ struct GraphicsPrivate { glCtx(SDL_GL_GetCurrentContext()), frameRate(DEF_FRAMERATE), frameCount(0), brightness(255), fpsLimiter(frameRate), useFrameSkip(rtData->config.frameSkip), frozen(false), - last_update(0), last_avg_update(0), integerScaleFactor(0, 0), + last_update(0), last_avg_update(0), backingScaleFactor(1), integerScaleFactor(0, 0), integerScaleActive(rtData->config.integerScaling.active), integerLastMileScaling(rtData->config.integerScaling.lastMileScaling) { avgFPSData = std::vector(); @@ -803,8 +805,8 @@ struct GraphicsPrivate { void updateScreenResoRatio(RGSSThreadData *rtData) { Vec2 &ratio = rtData->sizeResoRatio; - ratio.x = (float)scRes.x / scSize.x; - ratio.y = (float)scRes.y / scSize.y; + ratio.x = (float)scRes.x / scSize.x * backingScaleFactor; + ratio.y = (float)scRes.y / scSize.y * backingScaleFactor; rtData->screenOffset = scOffset; } @@ -889,7 +891,11 @@ struct GraphicsPrivate { void checkResize() { if (threadData->windowSizeMsg.poll(winSize)) { /* Query the actual size in pixels, not units */ - threadData->drawableSizeMsg.poll(winSize); + Vec2i drawableSize(winSize); + threadData->drawableSizeMsg.poll(drawableSize); + + backingScaleFactor = drawableSize.x / winSize.x; + winSize = drawableSize; /* Make sure integer buffers are rebuilt before screen offsets are * calculated so we have the final allocated buffer size ready */