forked from jaildesigner-jailgames/jaildoctors_dilemma
clang-tidy
This commit is contained in:
@@ -412,15 +412,15 @@ void SDL3GPUShader::render() {
|
||||
float vw = 0.0F;
|
||||
float vh = 0.0F;
|
||||
if (integer_scale_) {
|
||||
const int scale = std::max(1, std::min(static_cast<int>(sw) / tex_width_, static_cast<int>(sh) / tex_height_));
|
||||
vw = static_cast<float>(tex_width_ * scale);
|
||||
vh = static_cast<float>(tex_height_ * scale);
|
||||
const int SCALE = std::max(1, std::min(static_cast<int>(sw) / tex_width_, static_cast<int>(sh) / tex_height_));
|
||||
vw = static_cast<float>(tex_width_ * SCALE);
|
||||
vh = static_cast<float>(tex_height_ * SCALE);
|
||||
} else {
|
||||
const float scale = std::min(
|
||||
const float SCALE = std::min(
|
||||
static_cast<float>(sw) / static_cast<float>(tex_width_),
|
||||
static_cast<float>(sh) / static_cast<float>(tex_height_));
|
||||
vw = static_cast<float>(tex_width_) * scale;
|
||||
vh = static_cast<float>(tex_height_) * scale;
|
||||
vw = static_cast<float>(tex_width_) * SCALE;
|
||||
vh = static_cast<float>(tex_height_) * SCALE;
|
||||
}
|
||||
vx = std::floor((static_cast<float>(sw) - vw) * 0.5F);
|
||||
vy = std::floor((static_cast<float>(sh) - vh) * 0.5F);
|
||||
|
||||
@@ -40,7 +40,7 @@ class SDL3GPUShader : public ShaderBackend {
|
||||
|
||||
void render() override;
|
||||
void setTextureSize(float width, float height) override {}
|
||||
void cleanup() override; // Libera pipeline/texturas pero mantiene el device vivo
|
||||
void cleanup() final; // Libera pipeline/texturas pero mantiene el device vivo
|
||||
void destroy(); // Limpieza completa (device + swapchain); llamar solo al cerrar
|
||||
[[nodiscard]] auto isHardwareAccelerated() const -> bool override { return is_initialized_; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user