configure_input_player_widget: Mark variables as volatile

A GCC bug or ill-behaviored optimization causes this to behave strangely
on Arch Linux's MinGW GCC compiler (both GCC 10 and 11). Mark it as
volatile so the compiler avoids more optimizations here.
This commit is contained in:
lat9nq
2021-06-18 20:02:32 -04:00
parent 8d4dfc98ec
commit 1780004ba9

View File

@@ -2505,8 +2505,8 @@ void PlayerControlPreview::DrawArrowButton(QPainter& p, const QPointF center,
QPoint offset;
for (std::size_t point = 0; point < up_arrow_button.size() / 2; ++point) {
const float up_arrow_x = up_arrow_button[point * 2 + 0];
const float up_arrow_y = up_arrow_button[point * 2 + 1];
const volatile float up_arrow_x = up_arrow_button[point * 2 + 0];
const volatile float up_arrow_y = up_arrow_button[point * 2 + 1];
switch (direction) {
case Direction::Up: