Browse Source

Fix upscaling on PS2

ps2
Anders Jenbo 3 years ago
parent
commit
12d8ce6b18
  1. 2
      Source/options.cpp
  2. 8
      Source/storm/storm_svid.cpp
  3. 4
      Source/utils/display.cpp

2
Source/options.cpp

@ -900,7 +900,7 @@ GraphicsOptions::GraphicsOptions()
#endif
#ifndef USE_SDL1
, upscale("Upscale", OnlyIfNoImplicitRenderer | OptionEntryFlags::CantChangeInGame | OptionEntryFlags::RecreateUI, N_("Upscale"), N_("Enables image scaling from the game resolution to your monitor resolution. Prevents changing the monitor resolution and allows window resizing."),
#if defined(NXDK) || defined(PS2)
#ifdef NXDK
false
#else
true

8
Source/storm/storm_svid.cpp

@ -285,7 +285,11 @@ bool SVidPlayBegin(const char *filename, int flags)
if (renderer != nullptr) {
int renderWidth = static_cast<int>(SVidWidth);
int renderHeight = static_cast<int>(SVidHeight);
#ifndef PS2
texture = SDLWrap::CreateTexture(renderer, SDL_PIXELFORMAT_RGB888, SDL_TEXTUREACCESS_STREAMING, renderWidth, renderHeight);
#else
texture = SDLWrap::CreateTexture(renderer, SDL_PIXELFORMAT_ABGR1555, SDL_TEXTUREACCESS_STREAMING, renderWidth, renderHeight);
#endif
if (SDL_RenderSetLogicalSize(renderer, renderWidth, renderHeight) <= -1) {
ErrSdl();
}
@ -379,7 +383,11 @@ void SVidPlayEnd()
#ifndef USE_SDL1
if (renderer != nullptr) {
#ifndef PS2
texture = SDLWrap::CreateTexture(renderer, SDL_PIXELFORMAT_RGB888, SDL_TEXTUREACCESS_STREAMING, gnScreenWidth, gnScreenHeight);
#else
texture = SDLWrap::CreateTexture(renderer, SDL_PIXELFORMAT_ABGR1555, SDL_TEXTUREACCESS_STREAMING, gnScreenWidth, gnScreenHeight);
#endif
if (renderer != nullptr && SDL_RenderSetLogicalSize(renderer, gnScreenWidth, gnScreenHeight) <= -1) {
ErrSdl();
}

4
Source/utils/display.cpp

@ -361,7 +361,11 @@ void ReinitializeTexture()
auto quality = StrCat(static_cast<int>(*sgOptions.Graphics.scaleQuality));
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, quality.c_str());
#ifndef PS2
texture = SDLWrap::CreateTexture(renderer, SDL_PIXELFORMAT_RGB888, SDL_TEXTUREACCESS_STREAMING, gnScreenWidth, gnScreenHeight);
#else
texture = SDLWrap::CreateTexture(renderer, SDL_PIXELFORMAT_ABGR1555, SDL_TEXTUREACCESS_STREAMING, gnScreenWidth, gnScreenHeight);
#endif
}
void ReinitializeIntegerScale()

Loading…
Cancel
Save