-
-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/main' into fuckit
# Conflicts: # src/gui/gui.cc # src/main/main.cc
- Loading branch information
Showing
46 changed files
with
870 additions
and
273 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ko_fi: nicolasnoble |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# This workflow was added by CodeSee. Learn more at https://codesee.io/ | ||
# This is v2.0 of this workflow file | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request_target: | ||
types: [opened, synchronize, reopened] | ||
|
||
name: CodeSee | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
codesee: | ||
runs-on: ubuntu-latest | ||
continue-on-error: true | ||
name: Analyze the repo with CodeSee | ||
steps: | ||
- uses: Codesee-io/codesee-action@v2 | ||
with: | ||
codesee-token: ${{ secrets.CODESEE_ARCH_DIAG_API_TOKEN }} | ||
codesee-url: https://app.codesee.io |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/*************************************************************************** | ||
* Copyright (C) 2023 PCSX-Redux authors * | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
* This program is distributed in the hope that it will be useful, * | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of * | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | ||
* GNU General Public License for more details. * | ||
* * | ||
* You should have received a copy of the GNU General Public License * | ||
* along with this program; if not, write to the * | ||
* Free Software Foundation, Inc., * | ||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * | ||
***************************************************************************/ | ||
|
||
#include "core/arguments.h" | ||
|
||
#include <filesystem> | ||
|
||
PCSX::Arguments::Arguments(const CommandLine::args& args) { | ||
if (args.get<bool>("lua_stdout") || args.get<bool>("no-ui") || args.get<bool>("cli")) { | ||
m_luaStdoutEnabled = true; | ||
} | ||
if (args.get<bool>("stdout") && !args.get<bool>("tui")) m_stdoutEnabled = true; | ||
if (args.get<bool>("no-ui") || args.get<bool>("cli")) m_stdoutEnabled = true; | ||
if (args.get<bool>("testmode") || args.get<bool>("no-gui-log")) m_guiLogsEnabled = false; | ||
if (args.get<bool>("testmode")) m_testModeEnabled = true; | ||
if (args.get<bool>("portable")) m_portable = true; | ||
if (std::filesystem::exists("pcsx.json")) m_portable = true; | ||
if (std::filesystem::exists("Makefile")) m_portable = true; | ||
if (std::filesystem::exists(std::filesystem::path("..") / "pcsx-redux.sln")) m_portable = true; | ||
if (args.get<bool>("safe") || args.get<bool>("testmode") || args.get<bool>("cli")) m_safeModeEnabled = true; | ||
if (args.get<bool>("resetui")) m_uiResetRequested = true; | ||
if (args.get<bool>("noshaders")) m_shadersDisabled = true; | ||
if (args.get<bool>("noupdate")) m_updateDisabled = true; | ||
if (args.get<bool>("viewports")) m_viewportsEnabled = true; | ||
if (args.get<bool>("no-viewports")) m_viewportsEnabled = false; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
/*************************************************************************** | ||
* Copyright (C) 2023 PCSX-Redux authors * | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
* This program is distributed in the hope that it will be useful, * | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of * | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | ||
* GNU General Public License for more details. * | ||
* * | ||
* You should have received a copy of the GNU General Public License * | ||
* along with this program; if not, write to the * | ||
* Free Software Foundation, Inc., * | ||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * | ||
***************************************************************************/ | ||
|
||
#pragma once | ||
|
||
#include <stdint.h> | ||
|
||
#include "flags.h" | ||
|
||
namespace PCSX { | ||
|
||
class Arguments { | ||
public: | ||
Arguments(const CommandLine::args& args); | ||
Arguments(const Arguments&) = delete; | ||
Arguments(Arguments&&) = delete; | ||
Arguments& operator=(const Arguments&) = delete; | ||
Arguments& operator=(Arguments&&) = delete; | ||
|
||
// Returns true if stdout should be enabled. | ||
// Enabled with the flags -stdout (but not when -tui is used), -no-ui, or -cli. | ||
bool isStdoutEnabled() const { return m_stdoutEnabled; } | ||
|
||
// Returns true if Lua should be displaying its console output to stdout. | ||
// Enabled with the flags -lua_stdout, -no-ui, or -cli. | ||
bool isLuaStdoutEnabled() const { return m_luaStdoutEnabled; } | ||
|
||
// Returns true if the GUI logs window should be enabled. | ||
// Disabled with -testmode or -no-gui-log. | ||
bool isGUILogsEnabled() const { return m_guiLogsEnabled; } | ||
|
||
// Returns true if the the flag -testmode was used. | ||
bool isTestModeEnabled() const { return m_testModeEnabled; } | ||
|
||
// Returns true if the the flag -portable was used, if the executable is | ||
// located in the same directory as the pcsx.json file, or if the | ||
// executable is being run from its source tree. | ||
bool isPortable() const { return m_portable; } | ||
|
||
// Returns true if the safe mode was enabled. This implies | ||
// that the pcsx.json file won't be loaded. | ||
// Enabled with the flags -safe, -testmode, or -cli. | ||
bool isSafeModeEnabled() const { return m_safeModeEnabled; } | ||
|
||
// Returns true if the user requested to reset the UI. | ||
// Enabled with the flag -resetui. | ||
bool isUIResetRequested() const { return m_uiResetRequested; } | ||
|
||
// Returns true if the user requested that no shaders be used. | ||
// Enabled with the flag -noshaders. | ||
bool isShadersDisabled() const { return m_shadersDisabled; } | ||
|
||
// Returns true if the user requested that no update be performed. | ||
// Enabled with the flag -noupdate. | ||
bool isUpdateDisabled() const { return m_updateDisabled; } | ||
|
||
// Returns true if the user requested that viewports be enabled. | ||
// Toggled with the flags -viewports / -no-viewports. | ||
bool isViewportsEnabled() const { return m_viewportsEnabled; } | ||
|
||
private: | ||
bool m_luaStdoutEnabled = false; | ||
bool m_stdoutEnabled = false; | ||
bool m_guiLogsEnabled = true; | ||
bool m_testModeEnabled = false; | ||
bool m_portable = false; | ||
bool m_safeModeEnabled = false; | ||
bool m_uiResetRequested = false; | ||
bool m_shadersDisabled = false; | ||
bool m_updateDisabled = false; | ||
#ifdef __linux__ | ||
bool m_viewportsEnabled = false; | ||
#else | ||
bool m_viewportsEnabled = true; | ||
#endif | ||
}; | ||
|
||
} // namespace PCSX |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.