mirror of https://github.com/AxioDL/metaforce.git
Various fixes
- Unlock audio pump on exit - Remove WinMain from CMain (handled by SDL_main) - Use SDL2:: namespace in CMake - Disable buildcache on macOS CI for now
This commit is contained in:
parent
80eb125631
commit
d47d5661c6
|
@ -312,8 +312,6 @@
|
|||
"macos-default-relwithdebinfo"
|
||||
],
|
||||
"cacheVariables": {
|
||||
"CMAKE_C_COMPILER_LAUNCHER": "buildcache",
|
||||
"CMAKE_CXX_COMPILER_LAUNCHER": "buildcache",
|
||||
"CMAKE_OSX_ARCHITECTURES": "arm64;x86_64",
|
||||
"IMGUI_USE_FREETYPE": {
|
||||
"type": "BOOL",
|
||||
|
|
|
@ -343,6 +343,7 @@ public:
|
|||
void onAppExiting() noexcept override {
|
||||
m_imGuiConsole.Shutdown();
|
||||
if (m_voiceEngine) {
|
||||
m_voiceEngine->unlockPump();
|
||||
m_voiceEngine->stopPump();
|
||||
}
|
||||
if (g_mainMP1) {
|
||||
|
@ -488,6 +489,11 @@ public:
|
|||
} // namespace metaforce
|
||||
|
||||
static void SetupBasics(bool logging) {
|
||||
#if _WIN32
|
||||
if (logging && GetFileType(GetStdHandle(STD_ERROR_HANDLE)) == FILE_TYPE_UNKNOWN)
|
||||
logvisor::CreateWin32Console();
|
||||
#endif
|
||||
|
||||
auto result = zeus::validateCPU();
|
||||
if (!result.first) {
|
||||
#if _WIN32 && !WINDOWS_STORE
|
||||
|
@ -524,6 +530,7 @@ static bool IsClientLoggingEnabled(int argc, char** argv) {
|
|||
|
||||
#if !WINDOWS_STORE
|
||||
int main(int argc, char** argv) {
|
||||
|
||||
// TODO: This seems to fix a lot of weird issues with rounding
|
||||
// but breaks animations, need to research why this is the case
|
||||
// for now it's disabled
|
||||
|
@ -564,30 +571,3 @@ int main(int argc, char** argv) {
|
|||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if WINDOWS_STORE
|
||||
#include "boo/UWPViewProvider.hpp"
|
||||
using namespace Windows::ApplicationModel::Core;
|
||||
|
||||
[Platform::MTAThread] int WINAPIV main(Platform::Array<Platform::String ^> ^ params) {
|
||||
SetupBasics(false);
|
||||
metaforce::Application appCb;
|
||||
auto viewProvider = ref new boo::ViewProvider(appCb, "metaforce", "Metaforce", "metaforce", params, false);
|
||||
CoreApplication::Run(viewProvider);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#elif _WIN32
|
||||
#include <shellapi.h>
|
||||
#include <nowide/args.hpp>
|
||||
|
||||
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR lpCmdLine, int) {
|
||||
int argc = 0;
|
||||
char** argv = nullptr;
|
||||
nowide::args _(argc, argv);
|
||||
const DWORD outType = GetFileType(GetStdHandle(STD_ERROR_HANDLE));
|
||||
if (IsClientLoggingEnabled(argc, argv) && outType == FILE_TYPE_UNKNOWN)
|
||||
logvisor::CreateWin32Console();
|
||||
return main(argc, argv);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -153,11 +153,11 @@ set(DISCORD_RPC_LIBRARY "")
|
|||
if (NOT GEKKO AND NOT NX AND NOT IOS AND NOT TVOS)
|
||||
set(DISCORD_RPC_LIBRARY "discord-rpc")
|
||||
endif()
|
||||
set(RUNTIME_LIBRARIES amuse zeus nod NESEmulator libjpeg-turbo jbus kabufuda logvisor OptickCore imgui aurora SDL2-static
|
||||
set(RUNTIME_LIBRARIES amuse zeus nod NESEmulator libjpeg-turbo jbus kabufuda logvisor OptickCore imgui aurora
|
||||
boo # TODO move audiodev
|
||||
${DISCORD_RPC_LIBRARY}
|
||||
${ZLIB_LIBRARIES}
|
||||
SDL2main
|
||||
SDL2::SDL2-static SDL2::SDL2main
|
||||
)
|
||||
|
||||
add_runtime_common_library(RuntimeCommon ${RUNTIME_SOURCES_A})
|
||||
|
|
Loading…
Reference in New Issue