Skip to content

Commit

Permalink
Convert argv[i] to Path type before passing it to `File::IsDirect…
Browse files Browse the repository at this point in the history
…ory`

* Fix the error by converting `argv[i]` to `Path` type before passing it to `File::IsDirectory`
  • Loading branch information
vishwamartur committed Nov 27, 2024
1 parent 052d0c3 commit 0a8ded5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions SDL/SDLMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1492,10 +1492,9 @@ int main(int argc, char *argv[]) {

bool waitOnExit = g_Config.iGPUBackend == (int)GPUBackend::OPENGL;

// P2cd0
// Check if the path to a directory containing an unpacked ISO is passed as a command line argument
for (int i = 1; i < argc; i++) {
if (File::IsDirectory(argv[i])) {
if (File::IsDirectory(Path(argv[i]))) {
// Display the toast warning
System_Toast("Warning: Playing unpacked games may cause issues.");
break;
Expand Down

0 comments on commit 0a8ded5

Please sign in to comment.