tidy-fix automàtic (sense naming)
This commit is contained in:
@@ -906,8 +906,8 @@ namespace Rendering {
|
||||
|
||||
// ---- Calcular viewport (dimensions lògiques del canvas) ----
|
||||
// Si 4:3 actiu, effective_height ja és 240 (la textura estirada)
|
||||
const float logical_w = static_cast<float>(game_width_);
|
||||
const float logical_h = static_cast<float>(effective_height);
|
||||
const auto logical_w = static_cast<float>(game_width_);
|
||||
const auto logical_h = static_cast<float>(effective_height);
|
||||
|
||||
float vx = 0.0F;
|
||||
float vy = 0.0F;
|
||||
@@ -1276,7 +1276,9 @@ namespace Rendering {
|
||||
// Recrea la textura intermèdia amb les noves dimensions (320·N × 200·N).
|
||||
void SDL3GPUShader::setInternalResolution(int multiplier) {
|
||||
const int NEW = std::max(1, multiplier);
|
||||
if (NEW == internal_res_) return;
|
||||
if (NEW == internal_res_) {
|
||||
return;
|
||||
}
|
||||
internal_res_ = NEW;
|
||||
if (is_initialized_ && device_ != nullptr) {
|
||||
SDL_WaitForGPUIdle(device_);
|
||||
@@ -1286,7 +1288,9 @@ namespace Rendering {
|
||||
|
||||
void SDL3GPUShader::setStretch4_3(bool enabled) {
|
||||
stretch_4_3_ = enabled;
|
||||
if (!is_initialized_ || device_ == nullptr) return;
|
||||
if (!is_initialized_ || device_ == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Recrear scaled_texture_ perquè tinga les dimensions correctes (amb o sense 4:3)
|
||||
if (oversample_ > 1 && ss_factor_ > 0) {
|
||||
@@ -1464,7 +1468,9 @@ namespace Rendering {
|
||||
SDL_ReleaseGPUTexture(device_, internal_texture_);
|
||||
internal_texture_ = nullptr;
|
||||
}
|
||||
if (internal_res_ <= 1 || device_ == nullptr) return true;
|
||||
if (internal_res_ <= 1 || device_ == nullptr) {
|
||||
return true;
|
||||
}
|
||||
|
||||
const int W = game_width_ * internal_res_;
|
||||
const int H = game_height_ * internal_res_;
|
||||
|
||||
Reference in New Issue
Block a user