Skip to content

Commit

Permalink
Fix for Switch build
Browse files Browse the repository at this point in the history
  • Loading branch information
XITRIX committed Oct 29, 2024
1 parent b7a5f9d commit a1f57f3
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ if (PLATFORM_IOS OR PLATFORM_TVOS)
# set(ENABLE_ARC OFF)
endif ()

# toolchain
include(${EXTERN_PATH}/cmake/toolchain.cmake)

# Renderers
if (PLATFORM_IOS OR PLATFORM_TVOS)
set(USE_METAL_RENDERER ON)
else()
set(USE_GL_RENDERER ON)
endif ()

# toolchain
include(${EXTERN_PATH}/cmake/toolchain.cmake)

set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} "${EXTERN_PATH}/cmake")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${EXTERN_PATH}/cmake")
#find_package(PkgConfig REQUIRED)
Expand Down
2 changes: 1 addition & 1 deletion app/src/settings_tab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ SettingsTab::SettingsTab() {
[](bool value) { Settings::instance().set_request_hdr(value); });

#ifndef SUPPORT_HDR
requestHdr->removeFromSuperView(true);
requestHdr->hide([](){}, false, 0);
#endif

hwDecoding->init("settings/use_hw_decoding"_i18n, Settings::instance().use_hw_decoding(),
Expand Down
3 changes: 2 additions & 1 deletion app/src/streaming/ffmpeg/FFmpegVideoDecoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
#include "Settings.hpp"
#include "borealis.hpp"

#ifdef PLATFORM_APPLE
extern "C" {
#include <libavutil/opt.h>
#include <libavcodec/videotoolbox.h>
}
#endif

// Disables the deblocking filter at the cost of image quality
#define DISABLE_LOOP_FILTER 0x1
Expand Down
13 changes: 9 additions & 4 deletions extern/cmake/toolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ function(check_libromfs_generator)
endif()
endfunction()

if (APPLE)
add_definitions(-DPLATFORM_APPLE)
endif ()

if (PLATFORM_DESKTOP)
add_definitions(-DPLATFORM_DESKTOP)
if (APPLE)
set(PLATFORM_MACOS ON)
add_definitions(-DPLATFORM_MACOS)
endif ()
message(STATUS "building for Desktop")
set(CMAKE_TOOLCHAIN_FILE ${EXTERN_PATH}/vcpkg/scripts/buildsystems/vcpkg.cmake CACHE PATH "vcpkg toolchain file")
set(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -O0 -g2 -ggdb -Wall")
Expand Down Expand Up @@ -104,6 +104,11 @@ else()
message(FATAL_ERROR "Please set build target. Example: -DPLATFORM_DESKTOP=ON or -DPLATFORM_SWITCH=ON")
endif ()

if (PLATFORM_IOS OR PLATFROM_TVOS OR PLATFORM_MACOS)
set(PLATFORM_APPLE ON)
add_definitions(-DPLATFORM_APPLE)
endif()

# OpenGL driver
if (USE_DEKO3D)
message(STATUS "USE_DEKO3D")
Expand Down

0 comments on commit a1f57f3

Please sign in to comment.