mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-12-08 20:58:41 +00:00
Sdl message box when no args provided (#3843)
* Added a message box when no arguments are passed. * clang-fix * clang-fix episode 2 * Output message box error to stderr instead of stdout
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
// SPDX-FileCopyrightText: Copyright 2025 shadPS4 Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2025 shadPS4 Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
#include <SDL3/SDL_messagebox.h>
|
||||||
#include "functional"
|
#include "functional"
|
||||||
#include "iostream"
|
#include "iostream"
|
||||||
#include "string"
|
#include "string"
|
||||||
@@ -182,6 +183,10 @@ int main(int argc, char* argv[]) {
|
|||||||
}}};
|
}}};
|
||||||
|
|
||||||
if (argc == 1) {
|
if (argc == 1) {
|
||||||
|
if (!SDL_ShowSimpleMessageBox(
|
||||||
|
SDL_MESSAGEBOX_INFORMATION, "shadPS4",
|
||||||
|
"This is a CLI application. Please use the QTLauncher for a GUI.", nullptr))
|
||||||
|
std::cerr << "Could not display SDL message box! Error: " << SDL_GetError() << "\n";
|
||||||
int dummy = 0; // one does not simply pass 0 directly
|
int dummy = 0; // one does not simply pass 0 directly
|
||||||
arg_map.at("-h")(dummy);
|
arg_map.at("-h")(dummy);
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
Reference in New Issue
Block a user