Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

try sdl3 #4809

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ZAPDTR
2 changes: 1 addition & 1 deletion libultraship
Submodule libultraship updated 46 files
+4 −5 cmake/dependencies/common.cmake
+2 −2 cmake/dependencies/linux.cmake
+1 −1 include/libultraship/classes.h
+5 −5 src/Context.cpp
+25 −22 src/audio/SDLAudioPlayer.cpp
+1 −1 src/audio/SDLAudioPlayer.h
+2 −2 src/config/Config.cpp
+3 −3 src/controller/controldevice/controller/Controller.cpp
+9 −9 src/controller/controldevice/controller/mapping/factories/AxisDirectionMappingFactory.cpp
+26 −26 src/controller/controldevice/controller/mapping/factories/ButtonMappingFactory.cpp
+12 −12 src/controller/controldevice/controller/mapping/factories/GyroMappingFactory.cpp
+14 −12 src/controller/controldevice/controller/mapping/factories/LEDMappingFactory.cpp
+14 −12 src/controller/controldevice/controller/mapping/factories/RumbleMappingFactory.cpp
+10 −10 src/controller/controldevice/controller/mapping/sdl/SDLAxisDirectionToAnyMapping.cpp
+1 −1 src/controller/controldevice/controller/mapping/sdl/SDLAxisDirectionToAnyMapping.h
+1 −1 src/controller/controldevice/controller/mapping/sdl/SDLAxisDirectionToAxisDirectionMapping.cpp
+1 −1 src/controller/controldevice/controller/mapping/sdl/SDLAxisDirectionToButtonMapping.cpp
+70 −70 src/controller/controldevice/controller/mapping/sdl/SDLButtonToAnyMapping.cpp
+1 −1 src/controller/controldevice/controller/mapping/sdl/SDLButtonToAnyMapping.h
+1 −1 src/controller/controldevice/controller/mapping/sdl/SDLButtonToAxisDirectionMapping.cpp
+1 −1 src/controller/controldevice/controller/mapping/sdl/SDLButtonToButtonMapping.cpp
+4 −4 src/controller/controldevice/controller/mapping/sdl/SDLGyroMapping.cpp
+4 −2 src/controller/controldevice/controller/mapping/sdl/SDLLEDMapping.cpp
+27 −20 src/controller/controldevice/controller/mapping/sdl/SDLMapping.cpp
+3 −3 src/controller/controldevice/controller/mapping/sdl/SDLMapping.h
+2 −2 src/controller/controldevice/controller/mapping/sdl/SDLRumbleMapping.cpp
+42 −23 src/controller/deviceindex/ControllerDisconnectedWindow.cpp
+29 −14 src/controller/deviceindex/ControllerReorderingWindow.cpp
+22 −11 src/controller/deviceindex/ShipDeviceIndexMappingManager.cpp
+1 −1 src/debug/CrashHandler.h
+2 −2 src/graphic/Fast3D/Fast3dWindow.cpp
+5 −5 src/graphic/Fast3D/gfx_metal.cpp
+2 −2 src/graphic/Fast3D/gfx_metal.h
+1 −1 src/graphic/Fast3D/gfx_metal_shader.cpp
+1 −1 src/graphic/Fast3D/gfx_metal_shader.h
+28 −28 src/graphic/Fast3D/gfx_opengl.cpp
+1 −1 src/graphic/Fast3D/gfx_pc.cpp
+105 −69 src/graphic/Fast3D/gfx_sdl2.cpp
+1 −1 src/port/mobile/MobileImpl.cpp
+3 −3 src/public/libultra/os.cpp
+9 −1 src/public/libultra/os_vi.cpp
+1 −1 src/window/Window.cpp
+3 −3 src/window/gui/ConsoleWindow.cpp
+22 −22 src/window/gui/Gui.cpp
+1 −1 src/window/gui/Gui.h
+1 −1 src/window/gui/StatsWindow.cpp
49 changes: 14 additions & 35 deletions soh/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -303,19 +303,19 @@ endif()
################################################################################
# Compile definitions
################################################################################
find_package(SDL2)
set(SDL2-INCLUDE ${SDL2_INCLUDE_DIRS})
find_package(SDL3)
set(SDL3-INCLUDE ${SDL3_INCLUDE_DIRS})

if (BUILD_REMOTE_CONTROL)
find_package(SDL2_net)
# if (BUILD_REMOTE_CONTROL)
# find_package(SDL2_net)

if(NOT SDL2_net_FOUND)
message(STATUS "SDL2_net not found (it's possible the version installed is too old). Disabling BUILD_REMOTE_CONTROL.")
# if(NOT SDL2_net_FOUND)
# message(STATUS "SDL2_net not found (it's possible the version installed is too old). Disabling BUILD_REMOTE_CONTROL.")
set(BUILD_REMOTE_CONTROL 0)
else()
set(SDL2-NET-INCLUDE ${SDL_NET_INCLUDE_DIRS})
endif()
endif()
# else()
# set(SDL2-NET-INCLUDE ${SDL_NET_INCLUDE_DIRS})
# endif()
# endif()

target_include_directories(${PROJECT_NAME} PRIVATE assets
${CMAKE_CURRENT_SOURCE_DIR}/include/
Expand Down Expand Up @@ -346,8 +346,8 @@ target_include_directories(${PROJECT_NAME} PRIVATE assets
${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/src/graphic/Fast3D/U64/PR
${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/src/graphic
${CMAKE_CURRENT_SOURCE_DIR}/../ZAPDTR/ZAPD/resource/type
${SDL2-INCLUDE}
${SDL2-NET-INCLUDE}
${SDL3-INCLUDE}
# ${SDL2-NET-INCLUDE}
${BOOST-INCLUDE}
${CMAKE_CURRENT_SOURCE_DIR}/assets/
.
Expand Down Expand Up @@ -667,35 +667,14 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
"setupapi"
)
endif()
elseif(CMAKE_SYSTEM_NAME STREQUAL "NintendoSwitch")
find_package(SDL2)
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
set(ADDITIONAL_LIBRARY_DEPENDENCIES
"libultraship;"
SDL2::SDL2
-lglad
Threads::Threads
)
elseif(CMAKE_SYSTEM_NAME STREQUAL "CafeOS")
find_package(SDL2 REQUIRED)
set(ADDITIONAL_LIBRARY_DEPENDENCIES
"libultraship;"
SDL2::SDL2-static

"$<$<CONFIG:Debug>:-Wl,--wrap=abort>"
)
target_include_directories(${PROJECT_NAME} PRIVATE
${DEVKITPRO}/portlibs/wiiu/include/
)
else()
find_package(SDL2)
find_package(SDL3)
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
set(ADDITIONAL_LIBRARY_DEPENDENCIES
"libultraship;"
"ZAPDLib;"
SDL2::SDL2
SDL3::SDL3
"$<$<BOOL:${BUILD_REMOTE_CONTROL}>:SDL2_net::SDL2_net>"
${CMAKE_DL_LIBS}
Threads::Threads
Expand Down
4 changes: 2 additions & 2 deletions soh/include/functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ u32 Locale_IsRegionNative(void);
void _assert(const char* exp, const char* file, s32 line);
#elif defined(__linux__)
void __assert(const char* exp, const char* file, s32 line) __THROW;
#elif !defined(__APPLE__) && !defined(__SWITCH__)
#elif !defined(SDL_PLATFORM_APPLE) && !defined(__SWITCH__)
void __assert(const char* exp, const char* file, s32 line);
#endif
#if defined(__APPLE__) && defined(NDEBUG)
#if defined(SDL_PLATFORM_APPLE) && defined(NDEBUG)
void __assert(const char* exp, const char* file, s32 line);
#endif
void isPrintfInit(void);
Expand Down
56 changes: 40 additions & 16 deletions soh/soh/Enhancements/debugger/debugSaveEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -455,8 +455,11 @@ void DrawInventoryTab() {
uint8_t item = gSaveContext.inventory.items[index];
if (item != ITEM_NONE) {
const ItemMapEntry& slotEntry = itemMapping.find(item)->second;
if (ImGui::ImageButton(Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(slotEntry.name), ImVec2(32.0f, 32.0f), ImVec2(0, 0),
ImVec2(1, 1), 0)) {
if (ImGui::ImageButton(slotEntry.name.c_str(),
Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(slotEntry.name),
ImVec2(32.0f, 32.0f),
ImVec2(0, 0),
ImVec2(1, 1))) {
selectedIndex = index;
ImGui::OpenPopup(itemPopupPicker);
}
Expand Down Expand Up @@ -503,8 +506,11 @@ void DrawInventoryTab() {
ImGui::SameLine();
}
const ItemMapEntry& slotEntry = possibleItems[pickerIndex];
if (ImGui::ImageButton(Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(slotEntry.name), ImVec2(32.0f, 32.0f),
ImVec2(0, 0), ImVec2(1, 1), 0)) {
if (ImGui::ImageButton(slotEntry.name.c_str(),
Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(slotEntry.name),
ImVec2(32.0f, 32.0f),
ImVec2(0, 0),
ImVec2(1, 1))) {
gSaveContext.inventory.items[selectedIndex] = slotEntry.id;
// Set adult trade item flag if you're playing adult trade shuffle in rando
if (IS_RANDO &&
Expand Down Expand Up @@ -986,8 +992,11 @@ void DrawUpgradeIcon(const std::string& categoryName, int32_t categoryId, const
uint8_t item = items[CUR_UPG_VALUE(categoryId)];
if (item != ITEM_NONE) {
const ItemMapEntry& slotEntry = itemMapping[item];
if (ImGui::ImageButton(Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(slotEntry.name), ImVec2(32.0f, 32.0f), ImVec2(0, 0),
ImVec2(1, 1), 0)) {
if (ImGui::ImageButton(slotEntry.name.c_str(),
Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(slotEntry.name),
ImVec2(32.0f, 32.0f),
ImVec2(0, 0),
ImVec2(1, 1))) {
ImGui::OpenPopup(upgradePopupPicker);
}
} else {
Expand All @@ -1014,8 +1023,11 @@ void DrawUpgradeIcon(const std::string& categoryName, int32_t categoryId, const
UIWidgets::SetLastItemHoverText("None");
} else {
const ItemMapEntry& slotEntry = itemMapping[items[pickerIndex]];
if (ImGui::ImageButton(Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(slotEntry.name), ImVec2(32.0f, 32.0f), ImVec2(0, 0),
ImVec2(1, 1), 0)) {
if (ImGui::ImageButton(slotEntry.name.c_str(),
Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(slotEntry.name),
ImVec2(32.0f, 32.0f),
ImVec2(0, 0),
ImVec2(1, 1))) {
Inventory_ChangeUpgrade(categoryId, pickerIndex);
ImGui::CloseCurrentPopup();
}
Expand Down Expand Up @@ -1051,8 +1063,11 @@ void DrawEquipmentTab() {
bool hasEquip = (bitMask & gSaveContext.inventory.equipment) != 0;
const ItemMapEntry& entry = itemMapping[equipmentValues[i]];
ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0, 0, 0, 0));
if (ImGui::ImageButton(Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(hasEquip ? entry.name : entry.nameFaded),
ImVec2(32.0f, 32.0f), ImVec2(0, 0), ImVec2(1, 1), 0)) {
if (ImGui::ImageButton(entry.name.c_str(),
Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(hasEquip ? entry.name : entry.nameFaded),
ImVec2(32.0f, 32.0f),
ImVec2(0, 0),
ImVec2(1, 1))) {
if (hasEquip) {
gSaveContext.inventory.equipment &= ~bitMask;
} else {
Expand Down Expand Up @@ -1150,8 +1165,11 @@ void DrawQuestItemButton(uint32_t item) {
uint32_t bitMask = 1 << entry.id;
bool hasQuestItem = (bitMask & gSaveContext.inventory.questItems) != 0;
ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0, 0, 0, 0));
if (ImGui::ImageButton(Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(hasQuestItem ? entry.name : entry.nameFaded),
ImVec2(32.0f, 32.0f), ImVec2(0, 0), ImVec2(1, 1), 0)) {
if (ImGui::ImageButton(entry.name.c_str(),
Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(hasQuestItem ? entry.name : entry.nameFaded),
ImVec2(32.0f, 32.0f),
ImVec2(0, 0),
ImVec2(1, 1))) {
if (hasQuestItem) {
gSaveContext.inventory.questItems &= ~bitMask;
} else {
Expand All @@ -1168,8 +1186,11 @@ void DrawDungeonItemButton(uint32_t item, uint32_t scene) {
uint32_t bitMask = 1 << (entry.id - ITEM_KEY_BOSS); // Bitset starts at ITEM_KEY_BOSS == 0. the rest are sequential
bool hasItem = (bitMask & gSaveContext.inventory.dungeonItems[scene]) != 0;
ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0, 0, 0, 0));
if (ImGui::ImageButton(Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(hasItem ? entry.name : entry.nameFaded),
ImVec2(32.0f, 32.0f), ImVec2(0, 0), ImVec2(1, 1), 0)) {
if (ImGui::ImageButton(entry.name.c_str(),
Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(hasItem ? entry.name : entry.nameFaded),
ImVec2(32.0f, 32.0f),
ImVec2(0, 0),
ImVec2(1, 1))) {
if (hasItem) {
gSaveContext.inventory.dungeonItems[scene] &= ~bitMask;
} else {
Expand Down Expand Up @@ -1215,8 +1236,11 @@ void DrawQuestStatusTab() {
uint32_t bitMask = 1 << entry.id;
bool hasQuestItem = (bitMask & gSaveContext.inventory.questItems) != 0;
ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0, 0, 0, 0));
if (ImGui::ImageButton(Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(hasQuestItem ? entry.name : entry.nameFaded),
ImVec2(16.0f, 24.0f), ImVec2(0, 0), ImVec2(1, 1), 0)) {
if (ImGui::ImageButton(entry.name.c_str(),
Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(hasQuestItem ? entry.name : entry.nameFaded),
ImVec2(32.0f, 32.0f),
ImVec2(0, 0),
ImVec2(1, 1))) {
if (hasQuestItem) {
gSaveContext.inventory.questItems &= ~bitMask;
} else {
Expand Down
47 changes: 31 additions & 16 deletions soh/soh/Enhancements/randomizer/Plandomizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -715,15 +715,21 @@ void PlandomizerDrawItemPopup(uint32_t index) {
ImGui::PushID(item);
ImGui::TableNextColumn();
PlandomizerItemImageCorrection(plandomizerRandoRetrieveItem(item));
if (ImGui::ImageButton(textureID,
imageSize, textureUV0, textureUV1, imagePadding, ImVec4(0, 0, 0, 0), itemColor)) {
std::string name = plandomizerRandoRetrieveItem(item).GetName().english;
if (ImGui::ImageButton(name.c_str(),
textureID,
imageSize,
textureUV0,
textureUV1,
ImVec4(0, 0, 0, 0),
itemColor)) {
if (std::find(infiniteItemList.begin(), infiniteItemList.end(), plandoLogData[index].checkRewardItem.GetRandomizerGet()) == infiniteItemList.end()) {
PlandomizerAddToItemList(plandoLogData[index].checkRewardItem);
}
plandoLogData[index].checkRewardItem = plandomizerRandoRetrieveItem(item);
ImGui::CloseCurrentPopup();
}
UIWidgets::Tooltip(plandomizerRandoRetrieveItem(item).GetName().english.c_str());
UIWidgets::Tooltip(name.c_str());
PlandomizerOverlayText(std::make_pair(plandomizerRandoRetrieveItem(item), 1));
ImGui::PopID();
}
Expand All @@ -741,8 +747,14 @@ void PlandomizerDrawItemPopup(uint32_t index) {
ImGui::PushID(itemIndex);
auto itemToDraw = drawSlots.first;
PlandomizerItemImageCorrection(drawSlots.first);
if (ImGui::ImageButton(textureID,
imageSize, textureUV0, textureUV1, imagePadding, ImVec4(0, 0, 0, 0), itemColor)) {
auto name = drawSlots.first.GetName().english;
if (ImGui::ImageButton(name.c_str(),
textureID,
imageSize,
textureUV0,
textureUV1,
ImVec4(0, 0, 0, 0),
itemColor)) {
if (itemToDraw.GetRandomizerGet() >= RG_PROGRESSIVE_HOOKSHOT &&
itemToDraw.GetRandomizerGet() <= RG_PROGRESSIVE_GORONSWORD) {
plandoLogData[index].checkRewardItem = drawSlots.first;
Expand All @@ -757,7 +769,7 @@ void PlandomizerDrawItemPopup(uint32_t index) {
ImGui::CloseCurrentPopup();
}
if (!isClicked) {
UIWidgets::Tooltip(drawSlots.first.GetName().english.c_str());
UIWidgets::Tooltip(name.c_str());
}
ImGui::PopID();

Expand Down Expand Up @@ -786,12 +798,13 @@ void PlandomizerDrawIceTrapPopUp(uint32_t index) {
}
ImGui::TableNextColumn();
ImGui::PushID(items.first);
auto name = Rando::StaticData::RetrieveItem(items.first).GetName().english;
PlandomizerItemImageCorrection(Rando::StaticData::RetrieveItem(items.first));
if (ImGui::ImageButton(textureID, imageSize, textureUV0, textureUV1, imagePadding, ImVec4(0, 0, 0, 0), itemColor)) {
if (ImGui::ImageButton(name.c_str(), textureID, imageSize, textureUV0, textureUV1, ImVec4(0, 0, 0, 0), itemColor)) {
plandoLogData[index].iceTrapModel = Rando::StaticData::RetrieveItem(items.first);
ImGui::CloseCurrentPopup();
};
UIWidgets::Tooltip(Rando::StaticData::RetrieveItem(items.first).GetName().english.c_str());
UIWidgets::Tooltip(name.c_str());

auto itemObject = Rando::StaticData::RetrieveItem(items.first);
PlandomizerOverlayText(std::make_pair(itemObject, 1));
Expand All @@ -808,13 +821,14 @@ void PlandomizerDrawItemSlots(uint32_t index) {
ImGui::PushID(index);
PlandoPushImageButtonStyle();
PlandomizerItemImageCorrection(plandoLogData[index].checkRewardItem);
if (ImGui::ImageButton(textureID, imageSize, textureUV0, textureUV1, imagePadding, ImVec4(0, 0, 0, 0), itemColor)) {
auto name = plandoLogData[index].checkRewardItem.GetName().english;
if (ImGui::ImageButton(name.c_str(), textureID, imageSize, textureUV0, textureUV1, ImVec4(0, 0, 0, 0), itemColor)) {
shouldPopup = true;
temporaryItem = plandoLogData[index].checkRewardItem;
ImGui::OpenPopup("ItemList");
};
PlandoPopImageButtonStyle();
UIWidgets::Tooltip(plandoLogData[index].checkRewardItem.GetName().english.c_str());
UIWidgets::Tooltip(name.c_str());
PlandomizerOverlayText(std::make_pair(plandoLogData[index].checkRewardItem, 1));
PlandomizerDrawItemPopup(index);
ImGui::PopID();
Expand Down Expand Up @@ -852,12 +866,13 @@ void PlandomizerDrawIceTrapSetup(uint32_t index) {
ImGui::TableNextColumn();
PlandomizerItemImageCorrection(plandoLogData[index].iceTrapModel);
PlandoPushImageButtonStyle();
if (ImGui::ImageButton(textureID, imageSize, textureUV0, textureUV1, imagePadding, ImVec4(0, 0, 0, 0), itemColor)) {
auto name = plandoLogData[index].iceTrapModel.GetName().english;
if (ImGui::ImageButton(name.c_str(), textureID, imageSize, textureUV0, textureUV1, ImVec4(0, 0, 0, 0), itemColor)) {
shouldTrapPopup = true;
ImGui::OpenPopup("TrapList");
};
PlandoPopImageButtonStyle();
UIWidgets::Tooltip(plandoLogData[index].iceTrapModel.GetName().english.c_str());
UIWidgets::Tooltip(name.c_str());
PlandomizerDrawIceTrapPopUp(index);
ImGui::SameLine();
ImGui::TableNextColumn();
Expand Down Expand Up @@ -934,8 +949,8 @@ void PlandomizerDrawOptions() {
for (auto& hash : plandoHash) {
ImGui::PushID(index);
textureID = Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(gSeedTextures[hash].tex);
if (ImGui::ImageButton(Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName("HASH_ARROW_UP"),
ImVec2(35.0f, 18.0f), ImVec2(1, 1), ImVec2(0, 0), 2.0f, ImVec4(0, 0, 0, 0), ImVec4(1, 1, 1, 1))) {
if (ImGui::ImageButton("HASH ARROW UP", Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName("HASH_ARROW_UP"),
ImVec2(35.0f, 18.0f), ImVec2(1, 1), ImVec2(0, 0), ImVec4(0, 0, 0, 0), ImVec4(1, 1, 1, 1))) {
if (hash + 1 >= gSeedTextures.size()) {
hash = 0;
}
Expand All @@ -944,8 +959,8 @@ void PlandomizerDrawOptions() {
}
}
ImGui::Image(textureID, ImVec2(35.0f, 35.0f));
if (ImGui::ImageButton(Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName("HASH_ARROW_DWN"),
ImVec2(35.0f, 18.0f), ImVec2(0, 0), ImVec2(1, 1), 2.0f, ImVec4(0, 0, 0, 0), ImVec4(1, 1, 1, 1))) {
if (ImGui::ImageButton("HASH_ARROW_DWN", Ship::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName("HASH_ARROW_DWN"),
ImVec2(35.0f, 18.0f), ImVec2(0, 0), ImVec2(1, 1), ImVec4(0, 0, 0, 0), ImVec4(1, 1, 1, 1))) {
if (hash == 0) {
hash = gSeedTextures.size() - 1;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ void AdvancedResolutionSettingsWindow::DrawElement() {
const bool disabled_everything = !CVarGetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".Enabled", 0);
const bool disabled_pixelCount = !CVarGetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".VerticalResolutionToggle", 0);

#ifdef __APPLE__
#ifdef SDL_PLATFORM_APPLE
// Display HiDPI warning. (Remove this once we can definitively say it's fixed.)
ImGui::TextColored(messageColor[MESSAGE_INFO],
ICON_FA_INFO_CIRCLE " These settings may behave incorrectly on Retina displays.");
Expand Down
2 changes: 1 addition & 1 deletion soh/soh/Enhancements/speechsynthesizer/SpeechSynthesizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class SpeechSynthesizer {

#ifdef _WIN32
#include "SAPISpeechSynthesizer.h"
#elif defined(__APPLE__)
#elif defined(SDL_PLATFORM_APPLE)
#include "DarwinSpeechSynthesizer.h"
#endif

Expand Down
Loading
Loading