diff options
author | 2017-02-22 23:11:38 -0500 | |
---|---|---|
committer | 2017-02-22 23:13:41 -0500 | |
commit | 8c53c1438eb893ee9291c73e2ee26d34b5f8f2d7 (patch) | |
tree | 0544cad69bee0bd41e232abac03ab0ee5347edeb /src/osd/windows/main.cpp | |
parent | 28ab42fe7bce6449885f48a1baa3ae2000a79115 (diff) |
Fixed an issue where device options (e.g. -cart) were reported as unknown when they actually worked
This change also changes around how command line arguments are passed around; specifically I changed argc/argv to be std::vector<std::string>
Note this is not passed around 'const', the reason being that the command line processing will now "eat" the vector
Diffstat (limited to 'src/osd/windows/main.cpp')
-rw-r--r-- | src/osd/windows/main.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/osd/windows/main.cpp b/src/osd/windows/main.cpp index 7c33434c005..e87fa24e57c 100644 --- a/src/osd/windows/main.cpp +++ b/src/osd/windows/main.cpp @@ -20,7 +20,7 @@ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) -extern int utf8_main(int argc, char *argv[]); +extern int utf8_main(std::vector<std::string> &args); //============================================================ // main //============================================================ @@ -30,17 +30,13 @@ extern "C" int _tmain(int argc, TCHAR **argv) { int i; std::vector<std::string> argv_vectors(argc); - char **utf8_argv = (char **) alloca(argc * sizeof(char *)); // convert arguments to UTF-8 for (i = 0; i < argc; i++) - { argv_vectors[i] = osd::text::from_tstring(argv[i]); - utf8_argv[i] = (char *) argv_vectors[i].c_str(); - } // run utf8_main - return utf8_main(argc, utf8_argv); + return utf8_main(argv_vectors); } #endif |