From f48d5e4c4c03ffc8c374b2ec5a2d2455050bbf8a Mon Sep 17 00:00:00 2001 From: adityaruplaha Date: Sat, 21 Apr 2018 13:22:34 +0530 Subject: SDL2: Implement fullscreen. (Original PR: citra-emu/citra#3607) --- src/yuzu_cmd/yuzu.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/yuzu_cmd/yuzu.cpp') diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp index 261312f62..0a4644500 100644 --- a/src/yuzu_cmd/yuzu.cpp +++ b/src/yuzu_cmd/yuzu.cpp @@ -41,6 +41,7 @@ static void PrintHelp(const char* argv0) { std::cout << "Usage: " << argv0 << " [options] \n" "-g, --gdbport=NUMBER Enable gdb stub on port NUMBER\n" + "-f, --fullscreen Start in fullscreen mode\n" "-h, --help Display this help and exit\n" "-v, --version Output version information and exit\n"; } @@ -67,15 +68,18 @@ int main(int argc, char** argv) { #endif std::string filepath; + bool fullscreen = false; + static struct option long_options[] = { {"gdbport", required_argument, 0, 'g'}, + {"fullscreen", no_argument, 0, 'f'}, {"help", no_argument, 0, 'h'}, {"version", no_argument, 0, 'v'}, {0, 0, 0, 0}, }; while (optind < argc) { - char arg = getopt_long(argc, argv, "g:hv", long_options, &option_index); + char arg = getopt_long(argc, argv, "g:fhv", long_options, &option_index); if (arg != -1) { switch (arg) { case 'g': @@ -89,6 +93,10 @@ int main(int argc, char** argv) { exit(1); } break; + case 'f': + fullscreen = true; + NGLOG_INFO(Frontend, "Starting in fullscreen mode..."); + break; case 'h': PrintHelp(argv[0]); return 0; @@ -128,7 +136,7 @@ int main(int argc, char** argv) { Settings::values.use_gdbstub = use_gdbstub; Settings::Apply(); - std::unique_ptr emu_window{std::make_unique()}; + std::unique_ptr emu_window{std::make_unique(fullscreen)}; Core::System& system{Core::System::GetInstance()}; -- cgit v1.2.3