Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
flyinghead committed Jun 23, 2023
2 parents 98acd11 + 0070f9a commit 8b8113b
Show file tree
Hide file tree
Showing 175 changed files with 14,169 additions and 7,221 deletions.
16 changes: 7 additions & 9 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,19 @@ jobs:
with:
fetch-depth: 0
submodules: true

- uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: 'gradle'

- uses: actions/cache@v3
with:
path: ~/.ccache
key: android-ccache-${{ github.sha }}
restore-keys: android-ccache-

- uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: android-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: android-gradle-

- name: Gradle
working-directory: shell/android-studio
run: ./gradlew assembleRelease --parallel
Expand All @@ -52,7 +50,7 @@ jobs:
- name: Extract symbols
run: |
DUMP_SYMS=./core/deps/breakpad/bin/dump_syms
SO_DIR=shell/android-studio/flycast/build/intermediates/cmake/release/obj
SO_DIR=shell/android-studio/flycast/build/intermediates/merged_native_libs/release/out/lib
for arch in arm64-v8a armeabi-v7a x86 x86_64 ; do
$DUMP_SYMS $SO_DIR/$arch/libflycast.so > libflycast.so.sym
BUILD_ID=`head -1 libflycast.so.sym | awk '{ print $4 }'`
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
brew list -1 | grep python | while read formula; do brew unlink $formula; brew link --overwrite $formula; done
brew update
brew install libao ldid ninja pulseaudio
VULKAN_VER=1.3.243.0 && aria2c https://sdk.lunarg.com/sdk/download/$VULKAN_VER/mac/vulkansdk-macos-$VULKAN_VER.dmg
VULKAN_VER=1.3.250.0 && aria2c https://sdk.lunarg.com/sdk/download/$VULKAN_VER/mac/vulkansdk-macos-$VULKAN_VER.dmg
hdiutil attach ./vulkansdk-macos-*.dmg
sudo /Volumes/VulkanSDK/InstallVulkan.app/Contents/MacOS/InstallVulkan --root $HOME/VulkanSDK --accept-licenses --default-answer --confirm-command install
hdiutil detach /Volumes/VulkanSDK
Expand Down
16 changes: 12 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@ elseif(LIBRETRO)
set(CMAKE_SHARED_LIBRARY_PREFIX "")
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
target_compile_definitions(${PROJECT_NAME} PRIVATE LIBRETRO)
if(APPLE)
find_library(FOUNDATION Foundation)
target_link_libraries(${PROJECT_NAME} PRIVATE ${FOUNDATION})
endif()
if(ANDROID OR USE_GLES)
target_compile_definitions(${PROJECT_NAME} PRIVATE GLES GLES3 HAVE_OPENGLES HAVE_OPENGLES3)
find_library(GLES3_LIBRARIES NAMES GLESv3 GLESv2 NO_CACHE REQUIRED)
Expand Down Expand Up @@ -583,7 +587,9 @@ target_sources(${PROJECT_NAME} PRIVATE
core/deps/chdpsr/cdipsr.cpp
core/deps/chdpsr/cdipsr.h)

target_include_directories(${PROJECT_NAME} PRIVATE core/deps/nowide/include)
add_subdirectory(core/deps/nowide)
target_compile_definitions(nowide PRIVATE $<$<BOOL:${NINTENDO_SWITCH}>:_DEFAULT_SOURCE>)
target_link_libraries(${PROJECT_NAME} PRIVATE nowide::nowide)

if(NOT MINIUPNP_FOUND)
if(NINTENDO_SWITCH)
Expand All @@ -594,9 +600,6 @@ if(NOT MINIUPNP_FOUND)
option(UPNPC_BUILD_SAMPLE "Build sample executables" OFF)
option(UPNPC_NO_INSTALL "Disable installation" ON)
add_subdirectory(core/deps/miniupnpc)
if(CMAKE_SYSTEM_NAME STREQUAL "NetBSD")
set_property(TARGET libminiupnpc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -D_NETBSD_SOURCE")
endif()
if(WINDOWS_STORE)
get_target_property(miniupnpc-private-defs miniupnpc-private INTERFACE_COMPILE_DEFINITIONS)
list(REMOVE_ITEM miniupnpc-private-defs "_WIN32_WINNT=0x0501")
Expand Down Expand Up @@ -753,6 +756,9 @@ if(LIBRETRO)
shell/libretro/option.cpp
shell/libretro/oslib.cpp
shell/libretro/vmu_xhair.cpp)
if(APPLE)
target_sources(${PROJECT_NAME} PRIVATE shell/libretro/oslib_apple.mm)
endif()
endif()

target_sources(${PROJECT_NAME} PRIVATE
Expand Down Expand Up @@ -1735,6 +1741,8 @@ if(NINTENDO_SWITCH)
COMMAND ${CMAKE_AR} -x $<TARGET_FILE:xxHash::xxhash>
COMMAND ${CMAKE_AR} -x $<TARGET_FILE:chdr-static>
COMMAND ${CMAKE_AR} -x $<TARGET_FILE:zip>
COMMAND ${CMAKE_AR} -x $<TARGET_FILE:elf>
COMMAND ${CMAKE_AR} -x $<TARGET_FILE:flycast::res>
COMMAND ${CMAKE_AR} -rs flycast_libretro_libnx.a *.obj
COMMAND rm *.obj
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
Expand Down
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,16 @@ Grab the latest build from [**the builds page**](https://flyinghead.github.io/fl
Get fresh builds for your system [**on the builds page**](https://flyinghead.github.io/flycast-builds/).

**New:** Now automated test results are available as well.

### Build instructions:
`git clone https://github.com/flyinghead/flycast.git`

`cd flycast`

`git submodule update --init --recursive`

`mkdir build && cd build`

`cmake ..`

`make`
2 changes: 2 additions & 0 deletions core/archive/7zArchive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
#include "deps/lzma/7zCrc.h"
#include "deps/lzma/Alloc.h"

#include <cstring>

#define kInputBufSize ((size_t)1 << 18)

static bool crc_tables_generated;
Expand Down
1 change: 1 addition & 0 deletions core/archive/7zArchive.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "deps/lzma/7zFile.h"

#include <algorithm>
#include <cstring>

class SzArchive : public Archive
{
Expand Down
2 changes: 2 additions & 0 deletions core/archive/rzip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#include "rzip.h"
#include <zlib.h>

#include <cstring>

const u8 RZipHeader[8] = { '#', 'R', 'Z', 'I', 'P', 'v', 1, '#' };

bool RZipFile::Open(const std::string& path, bool write)
Expand Down
6 changes: 6 additions & 0 deletions core/cheats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,12 @@ void CheatManager::reset(const std::string& gameId)
setMushikingCheats(0xb0e538);
else if (gameId == "MKG TKOB 2K3 2ND VER1.002-")// mushikeo
setMushikingCheats(0x4ad56c);
else if (gameId == "MKG TKOB 2K3 2ND KOR VER1.000-") // mushikk
setMushikingCheats(0x4ac9b8);
else if (gameId == "MKG TKOB 2K3 2ND CHN VER1.000-") // mushikc
setMushikingCheats(0x4aa9b8);
else if (gameId == "MKG TKOB 2 KOR VER1.000-") // mushik2k
setMushikingCheats(0x706084);
}
}
if (config::WidescreenGameHacks)
Expand Down
2 changes: 2 additions & 0 deletions core/cheats.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
#pragma once
#include "types.h"

#include <vector>

struct WidescreenCheat
{
const char *game_id;
Expand Down
2 changes: 1 addition & 1 deletion core/deps/VulkanMemoryAllocator
1 change: 1 addition & 0 deletions core/deps/imgui/backends/imgui_impl_dx11.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,7 @@ void ImGui_ImplDX11_Shutdown()
if (bd->pd3dDeviceContext) { bd->pd3dDeviceContext->Release(); }
io.BackendRendererName = nullptr;
io.BackendRendererUserData = nullptr;
io.BackendFlags &= ~ImGuiBackendFlags_RendererHasVtxOffset;
IM_DELETE(bd);
}

Expand Down
1 change: 1 addition & 0 deletions core/deps/imgui/backends/imgui_impl_dx9.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ void ImGui_ImplDX9_Shutdown()
if (bd->pd3dDevice) { bd->pd3dDevice->Release(); }
io.BackendRendererName = nullptr;
io.BackendRendererUserData = nullptr;
io.BackendFlags &= ~ImGuiBackendFlags_RendererHasVtxOffset;
IM_DELETE(bd);
}

Expand Down
1 change: 1 addition & 0 deletions core/deps/imgui/backends/imgui_impl_vulkan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1005,6 +1005,7 @@ void ImGui_ImplVulkan_Shutdown()
ImGui_ImplVulkan_DestroyDeviceObjects();
io.BackendRendererName = nullptr;
io.BackendRendererUserData = nullptr;
io.BackendFlags &= ~ImGuiBackendFlags_RendererHasVtxOffset;
IM_DELETE(bd);
}

Expand Down
Loading

0 comments on commit 8b8113b

Please sign in to comment.