treballant en internal resolution
This commit is contained in:
@@ -33,6 +33,7 @@ class Screen {
|
||||
void cycleScalingMode(int dir); // Cicla DISABLED/STRETCH/LETTERBOX/OVERSCAN/INTEGER
|
||||
void toggleVSync();
|
||||
void cycleTextureFilter(int dir); // Cicla NEAREST/LINEAR
|
||||
void changeInternalResolution(int dir); // +/−1, clampat a [1, max_zoom_]
|
||||
auto nextShaderType() -> bool; // false si GPU off / shaders off
|
||||
auto prevShaderType() -> bool; // idem
|
||||
auto nextPreset() -> bool; // false si GPU off / shaders off
|
||||
@@ -45,6 +46,7 @@ class Screen {
|
||||
// Getters
|
||||
[[nodiscard]] auto isFullscreen() const -> bool { return fullscreen_; }
|
||||
[[nodiscard]] auto getZoom() const -> int { return zoom_; }
|
||||
[[nodiscard]] auto getMaxZoom() const -> int { return max_zoom_; }
|
||||
[[nodiscard]] auto isHardwareAccelerated() const -> bool;
|
||||
[[nodiscard]] auto getActiveShaderName() const -> const char*;
|
||||
[[nodiscard]] auto getWindow() -> SDL_Window* { return window_; }
|
||||
@@ -58,12 +60,15 @@ class Screen {
|
||||
void calculateMaxZoom();
|
||||
void initShaders();
|
||||
void applyFallbackPresentation(); // Logical presentation + scale mode per al path SDL_Renderer
|
||||
void ensureFallbackInternalTexture(); // Recrea internal_texture_sdl_ si cal (fallback path)
|
||||
|
||||
static Screen* instance_;
|
||||
|
||||
SDL_Window* window_{nullptr};
|
||||
SDL_Renderer* renderer_{nullptr};
|
||||
SDL_Texture* texture_{nullptr}; // 320x200 streaming, ABGR8888 (fallback SDL_Renderer)
|
||||
SDL_Texture* texture_{nullptr}; // 320x200 streaming, ABGR8888 (fallback SDL_Renderer)
|
||||
SDL_Texture* internal_texture_sdl_{nullptr}; // 320·N x 200·N TARGET (fallback path, només si N>1)
|
||||
int internal_texture_mult_{0}; // Multiplicador amb què es va crear internal_texture_sdl_
|
||||
|
||||
// Backend GPU (nullptr si no disponible o desactivat)
|
||||
std::unique_ptr<Rendering::ShaderBackend> shader_backend_;
|
||||
|
||||
Reference in New Issue
Block a user