2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-10 07:07:42 +00:00

Windows refactors

This commit is contained in:
Jack Andersen
2015-08-30 17:44:42 -10:00
parent 7223a9dce5
commit d1faf4e72d
40 changed files with 129 additions and 80 deletions

View File

@@ -1,3 +1,8 @@
#if _WIN32
#include <objbase.h>
#endif
#include <clocale>
#include <memory>
#include <boo/boo.hpp>
#include "CBasics.hpp"
@@ -139,7 +144,7 @@ void CMain::FillInAssetIDs()
void CMain::LoadAudio()
{
}
int CMain::RsMain(int argc, const char* argv[])
int CMain::RsMain(int argc, const boo::SystemChar* argv[])
{
TOneStatic<CGameGlobalObjects> globalObjs;
InitializeSubsystems();
@@ -159,11 +164,21 @@ int CMain::RsMain(int argc, const char* argv[])
}
}
#ifdef _WIN32
int wmain(int argc, const wchar_t* argv[])
#else
int main(int argc, const char* argv[])
#endif
{
#if _WIN32
CoInitializeEx(nullptr, COINIT_MULTITHREADED);
#else
std::setlocale(LC_ALL, "en-US.UTF-8");
#endif
Retro::TOneStatic<Retro::MP1::CMain> main;
std::unique_ptr<boo::IApplication> app =
boo::ApplicationBootstrap(boo::IApplication::PLAT_AUTO, *main,
"mp1", "MP1", argc, argv);
_S("mp1"), _S("MP1"), argc, argv);
return main->RsMain(argc, argv);
}