diff --git a/src/core/gpu.h b/src/core/gpu.h index 86a3ece82..6d8319205 100644 --- a/src/core/gpu.h +++ b/src/core/gpu.h @@ -383,18 +383,15 @@ protected: #if 0 const u32 draw_ticks = static_cast((std::abs(x1 * (y2 - y3) + x2 * (y3 - y1) + x3 * (y1 - y2)) + 1u) / 2u); #else - const u32 draw_ticks = (width * height) / 2; + const u32 draw_ticks = ((width + 1) / 2) * height; #endif - AddCommandTicks(draw_ticks << BoolToUInt8(textured | shaded)); + AddCommandTicks(draw_ticks << (BoolToUInt8(textured))); } ALWAYS_INLINE void AddDrawRectangleTicks(u32 width, u32 height, bool textured) { - AddCommandTicks((width * height) << BoolToUInt8(textured)); - } - ALWAYS_INLINE void AddDrawLineTicks(u32 width, u32 height, bool shaded) - { - AddCommandTicks(std::max(width, height)); + AddCommandTicks((width * height) << (BoolToUInt8(textured))); } + ALWAYS_INLINE void AddDrawLineTicks(u32 width, u32 height, bool shaded) { AddCommandTicks(std::max(width, height)); } HostDisplay* m_host_display = nullptr; System* m_system = nullptr;