[Base] Changed entry point to wmain for Windows
This prevents subapps from crashing when executing wmain specific functions
This commit is contained in:
parent
52ec0acd0c
commit
7977d7ab98
|
@ -13,7 +13,8 @@
|
||||||
#include "xenia/base/console_app_main.h"
|
#include "xenia/base/console_app_main.h"
|
||||||
#include "xenia/base/main_win.h"
|
#include "xenia/base/main_win.h"
|
||||||
|
|
||||||
int main(int argc_ignored, char** argv_ignored) {
|
// A wide character entry point is required for functions like _get_wpgmptr.
|
||||||
|
int wmain(int argc_ignored, wchar_t** argv_ignored) {
|
||||||
xe::ConsoleAppEntryInfo entry_info = xe::GetConsoleAppEntryInfo();
|
xe::ConsoleAppEntryInfo entry_info = xe::GetConsoleAppEntryInfo();
|
||||||
|
|
||||||
std::vector<std::string> args;
|
std::vector<std::string> args;
|
||||||
|
|
|
@ -27,7 +27,7 @@ static bool has_shell_environment_variable() {
|
||||||
size_t size = 0;
|
size_t size = 0;
|
||||||
// Check if SHELL exists
|
// Check if SHELL exists
|
||||||
// If it doesn't, then we are in a Windows Terminal
|
// If it doesn't, then we are in a Windows Terminal
|
||||||
auto error = getenv_s(&size, nullptr, 0, "SHELL");
|
auto error = _wgetenv_s(&size, nullptr, 0, L"SHELL");
|
||||||
if (error) {
|
if (error) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue