Fixed SDL build on win32 and zexall build (nw)

This commit is contained in:
Miodrag Milanovic 2017-03-26 09:57:31 +02:00
parent 6cb38b0771
commit cc07ecc00e
2 changed files with 15 additions and 3 deletions

View File

@ -181,8 +181,14 @@ extern "C" DECLSPEC void SDLCALL SDL_SetModuleHandle(void *hInst);
#endif
// translated to utf8_main
int main(int argc, char *argv[])
#if defined(SDLMAME_WIN32)
int main(std::vector<std::string> &args)
{
#else
int main(int argc, char** argv)
{
std::vector<std::string> args(argv, argv+argc);
#endif
int res = 0;
// disable I/O buffering
@ -210,7 +216,7 @@ int main(int argc, char *argv[])
sdl_options options;
sdl_osd_interface osd(options);
osd.register_options();
res = emulator_info::start_frontend(options, osd, argc, argv);
res = emulator_info::start_frontend(options, osd, args);
}
#ifdef SDLMAME_UNIX

View File

@ -76,7 +76,7 @@ private:
zexall_machine_manager* zexall_machine_manager::m_manager = nullptr;
int emulator_info::start_frontend(emu_options &options, osd_interface &osd, int argc, char *argv[])
int emulator_info::start_frontend(emu_options &options, osd_interface &osd, std::vector<std::string> &args)
{
std::string error_string;
options.set_value(OSDOPTION_VIDEO, "none", OPTION_PRIORITY_MAXIMUM, error_string);
@ -87,6 +87,12 @@ int emulator_info::start_frontend(emu_options &options, osd_interface &osd, int
return 0;
}
int emulator_info::start_frontend(emu_options &options, osd_interface &osd, int argc, char *argv[])
{
std::vector<std::string> args(argv, argv + argc);
return start_frontend(options, osd, args);
}
const char * emulator_info::get_bare_build_version() { return nullptr; }
const char * emulator_info::get_build_version() { return nullptr; }