Merge branch 'master' into ZSMv1

This commit is contained in:
ZeroByteOrg 2022-06-23 13:45:12 -05:00
commit ae7b271e1d
128 changed files with 8022 additions and 1597 deletions

View file

@ -30,6 +30,7 @@
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <combaseapi.h>
#include <shellapi.h>
#else
#include <unistd.h>
@ -153,6 +154,7 @@ TAParamResult pVersion(String) {
printf("- puNES by FHorse (GPLv2)\n");
printf("- reSID by Dag Lem (GPLv2)\n");
printf("- Stella by Stella Team (GPLv2)\n");
printf("- vgsound_emu by cam900 (BSD 3-clause)\n");
return TA_PARAM_QUIT;
}
@ -251,6 +253,12 @@ void initParams() {
// TODO: add crash log
int main(int argc, char** argv) {
initLog();
#ifdef _WIN32
HRESULT coResult=CoInitializeEx(NULL,COINIT_MULTITHREADED);
if (coResult!=S_OK) {
logE("CoInitializeEx failed!");
}
#endif
#if !(defined(__APPLE__) || defined(_WIN32) || defined(ANDROID))
// workaround for Wayland HiDPI issue
if (getenv("SDL_VIDEODRIVER")==NULL) {
@ -455,6 +463,12 @@ int main(int argc, char** argv) {
logI("stopping engine.");
e.quit();
#ifdef _WIN32
if (coResult==S_OK || coResult==S_FALSE) {
CoUninitialize();
}
#endif
return 0;
}