mirror of
https://github.com/stenzek/duckstation.git
synced 2025-06-07 12:05:52 +00:00
Justifier: Fix byteswapped RGB colours
This commit is contained in:
parent
589b8f5139
commit
773ec046b5
@ -1,4 +1,4 @@
|
|||||||
// SPDX-FileCopyrightText: 2019-2024 Connor McLaughlin <stenzek@gmail.com>
|
// SPDX-FileCopyrightText: 2019-2025 Connor McLaughlin <stenzek@gmail.com>
|
||||||
// SPDX-License-Identifier: CC-BY-NC-ND-4.0
|
// SPDX-License-Identifier: CC-BY-NC-ND-4.0
|
||||||
|
|
||||||
#include "guncon.h"
|
#include "guncon.h"
|
||||||
@ -323,7 +323,10 @@ void GunCon::LoadSettings(const SettingsInterface& si, const char* section, bool
|
|||||||
cursor_color_str[0] == '#' ? std::string_view(cursor_color_str).substr(1) : std::string_view(cursor_color_str),
|
cursor_color_str[0] == '#' ? std::string_view(cursor_color_str).substr(1) : std::string_view(cursor_color_str),
|
||||||
16));
|
16));
|
||||||
if (cursor_color_opt.has_value())
|
if (cursor_color_opt.has_value())
|
||||||
|
{
|
||||||
cursor_color = cursor_color_opt.value();
|
cursor_color = cursor_color_opt.value();
|
||||||
|
cursor_color = (cursor_color & 0x00FF00u) | ((cursor_color >> 16) & 0xFFu) | ((cursor_color & 0xFFu) << 16);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const s32 prev_pointer_index = GetSoftwarePointerIndex();
|
const s32 prev_pointer_index = GetSoftwarePointerIndex();
|
||||||
|
@ -418,7 +418,10 @@ void Justifier::LoadSettings(const SettingsInterface& si, const char* section, b
|
|||||||
cursor_color_str[0] == '#' ? std::string_view(cursor_color_str).substr(1) : std::string_view(cursor_color_str),
|
cursor_color_str[0] == '#' ? std::string_view(cursor_color_str).substr(1) : std::string_view(cursor_color_str),
|
||||||
16));
|
16));
|
||||||
if (cursor_color_opt.has_value())
|
if (cursor_color_opt.has_value())
|
||||||
|
{
|
||||||
cursor_color = cursor_color_opt.value();
|
cursor_color = cursor_color_opt.value();
|
||||||
|
cursor_color = (cursor_color & 0x00FF00u) | ((cursor_color >> 16) & 0xFFu) | ((cursor_color & 0xFFu) << 16);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const s32 prev_pointer_index = GetSoftwarePointerIndex();
|
const s32 prev_pointer_index = GetSoftwarePointerIndex();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user