Remove PUBLIC_RELEASE flag and tie asserts to debug config (#287)

Removes the -DPUBLIC_RELEASE flag. Cemu's debug asserts are now only enabled if the build configuration is Debug. Similarly, on Windows the console is only shown for Debug builds.
This commit is contained in:
Exzap 2022-09-24 08:43:27 +02:00 committed by GitHub
parent b720d17a97
commit 3bceb39966
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
68 changed files with 154 additions and 186 deletions

View file

@ -246,7 +246,7 @@ int mainEmulatorHLE()
wxMessageBox("Cemu doesn't have write access to it's own directory.\nPlease move it to a different location or run Cemu as administrator!", "Warning", wxOK|wxICON_ERROR); // todo - different error messages per OS
LatteOverlay_init();
// run a couple of tests if in non-release mode
#ifndef PUBLIC_RELEASE
#ifdef CEMU_DEBUG_ASSERT
unitTests();
#endif
// init common
@ -338,39 +338,30 @@ void ToolShaderCacheMerger();
#if BOOST_OS_WINDOWS
#ifndef PUBLIC_RELEASE
#include <crtdbg.h>
int wmain(int argc, wchar_t* argv[])
{
SDL_SetMainReady();
_CrtSetDbgFlag(_CRTDBG_CHECK_DEFAULT_DF);
//ToolShaderCacheMerger();
if (!LaunchSettings::HandleCommandline(argc, argv))
return 0;
ActiveSettings::LoadOnce();
HandlePostUpdate();
return mainEmulatorHLE();
}
#else
// entrypoint for release builds
int wWinMain( _In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _In_ LPTSTR lpCmdLine, _In_ int nShowCmd)
{
SDL_SetMainReady();
if (!LaunchSettings::HandleCommandline(lpCmdLine))
return 0;
ActiveSettings::LoadOnce();
HandlePostUpdate();
return mainEmulatorHLE();
}
#endif
// entrypoint for debug builds with console
int main(int argc, char* argv[])
{
SDL_SetMainReady();
if (!LaunchSettings::HandleCommandline(argc, argv))
return 0;
ActiveSettings::LoadOnce();
HandlePostUpdate();
return mainEmulatorHLE();
}
#else
int main(int argc, char *argv[])
{
#if BOOST_OS_LINUX