mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-20 04:29:13 +12:00
Merge branch 'master' into shader-decomp
This commit is contained in:
commit
73a5d44978
8 changed files with 65 additions and 4 deletions
|
@ -41,6 +41,9 @@ void EmulatorConfig::load() {
|
|||
discordRpcEnabled = toml::find_or<toml::boolean>(general, "EnableDiscordRPC", false);
|
||||
usePortableBuild = toml::find_or<toml::boolean>(general, "UsePortableBuild", false);
|
||||
defaultRomPath = toml::find_or<std::string>(general, "DefaultRomPath", "");
|
||||
|
||||
printAppVersion = toml::find_or<toml::boolean>(general, "PrintAppVersion", true);
|
||||
appVersionOnWindow = toml::find_or<toml::boolean>(general, "AppVersionOnWindow", false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -128,6 +131,8 @@ void EmulatorConfig::save() {
|
|||
data["General"]["EnableDiscordRPC"] = discordRpcEnabled;
|
||||
data["General"]["UsePortableBuild"] = usePortableBuild;
|
||||
data["General"]["DefaultRomPath"] = defaultRomPath.string();
|
||||
data["General"]["PrintAppVersion"] = printAppVersion;
|
||||
data["General"]["AppVersionOnWindow"] = appVersionOnWindow;
|
||||
|
||||
data["GPU"]["EnableShaderJIT"] = shaderJitEnabled;
|
||||
data["GPU"]["Renderer"] = std::string(Renderer::typeToString(rendererType));
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#include <version.hpp>
|
||||
#include <emulator.hpp>
|
||||
#include <hydra/core.hxx>
|
||||
#include <renderer_gl/renderer_gl.hpp>
|
||||
|
@ -150,7 +151,7 @@ HC_API const char* getInfo(hydra::InfoType type) {
|
|||
case hydra::InfoType::SystemName: return "Nintendo 3DS";
|
||||
case hydra::InfoType::Description: return "HLE 3DS emulator. There's a little Alber in your computer and he runs Nintendo 3DS games.";
|
||||
case hydra::InfoType::Author: return "wheremyfoodat (Peach)";
|
||||
case hydra::InfoType::Version: return "0.7";
|
||||
case hydra::InfoType::Version: return PANDA3DS_VERSION;
|
||||
case hydra::InfoType::License: return "GPLv3";
|
||||
case hydra::InfoType::Website: return "https://panda3ds.com/";
|
||||
case hydra::InfoType::Extensions: return "3ds,cci,cxi,app,3dsx,elf,axf";
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
#include <libretro.h>
|
||||
|
||||
#include <version.hpp>
|
||||
#include <emulator.hpp>
|
||||
#include <renderer_gl/renderer_gl.hpp>
|
||||
|
||||
|
@ -204,7 +205,7 @@ static void ConfigCheckVariables() {
|
|||
void retro_get_system_info(retro_system_info* info) {
|
||||
info->need_fullpath = true;
|
||||
info->valid_extensions = "3ds|3dsx|elf|axf|cci|cxi|app";
|
||||
info->library_version = "0.8";
|
||||
info->library_version = PANDA3DS_VERSION;
|
||||
info->library_name = "Panda3DS";
|
||||
info->block_extract = true;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "panda_qt/about_window.hpp"
|
||||
#include "version.hpp"
|
||||
|
||||
#include <QLabel>
|
||||
#include <QTextEdit>
|
||||
|
@ -17,6 +18,8 @@ AboutWindow::AboutWindow(QWidget* parent) : QDialog(parent) {
|
|||
QStringLiteral(R"(
|
||||
<p style='font-size:38pt; font-weight:400;'>Panda3DS</p>
|
||||
|
||||
<p style='font-size:18pt;'>v%VERSION_STRING%</p>
|
||||
|
||||
<p>
|
||||
%ABOUT_PANDA3DS%<br>
|
||||
<a href='https://panda3ds.com/'>%SUPPORT%</a><br>
|
||||
|
@ -26,6 +29,7 @@ AboutWindow::AboutWindow(QWidget* parent) : QDialog(parent) {
|
|||
<a>%AUTHORS%</a>
|
||||
</p>
|
||||
)")
|
||||
.replace(QStringLiteral("%VERSION_STRING%"), PANDA3DS_VERSION)
|
||||
.replace(QStringLiteral("%ABOUT_PANDA3DS%"), tr("Panda3DS is a free and open source Nintendo 3DS emulator, for Windows, MacOS and Linux"))
|
||||
.replace(QStringLiteral("%SUPPORT%"), tr("Visit panda3ds.com for help with Panda3DS and links to our official support sites."))
|
||||
.replace(
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include <cstdio>
|
||||
#include <fstream>
|
||||
|
||||
#include "version.hpp"
|
||||
#include "cheats.hpp"
|
||||
#include "input_mappings.hpp"
|
||||
#include "sdl_sensors.hpp"
|
||||
|
@ -98,6 +99,14 @@ MainWindow::MainWindow(QApplication* app, QWidget* parent) : QMainWindow(parent)
|
|||
}
|
||||
}
|
||||
|
||||
if (emu->getConfig().appVersionOnWindow) {
|
||||
setWindowTitle("Alber v" PANDA3DS_VERSION);
|
||||
}
|
||||
|
||||
if (emu->getConfig().printAppVersion) {
|
||||
printf("Welcome to Panda3DS v%s!\n", PANDA3DS_VERSION);
|
||||
}
|
||||
|
||||
// The emulator graphics context for the thread should be initialized in the emulator thread due to how GL contexts work
|
||||
emuThread = std::thread([this]() {
|
||||
const RendererType rendererType = emu->getConfig().rendererType;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "panda_sdl/frontend_sdl.hpp"
|
||||
#include "version.hpp"
|
||||
|
||||
#include <glad/gl.h>
|
||||
|
||||
|
@ -33,13 +34,18 @@ FrontendSDL::FrontendSDL() : keyboardMappings(InputMappings::defaultKeyboardMapp
|
|||
needOpenGL = needOpenGL || (config.rendererType == RendererType::OpenGL);
|
||||
#endif
|
||||
|
||||
const char* windowTitle = config.appVersionOnWindow ? ("Alber v" PANDA3DS_VERSION) : "Alber";
|
||||
if (config.printAppVersion) {
|
||||
printf("Welcome to Panda3DS v%s!\n", PANDA3DS_VERSION);
|
||||
}
|
||||
|
||||
if (needOpenGL) {
|
||||
// Demand 3.3 core for software renderer, or 4.1 core for OpenGL renderer (max available on MacOS)
|
||||
// MacOS gets mad if we don't explicitly demand a core profile
|
||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
|
||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, config.rendererType == RendererType::Software ? 3 : 4);
|
||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, config.rendererType == RendererType::Software ? 3 : 1);
|
||||
window = SDL_CreateWindow("Alber", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 400, 480, SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE);
|
||||
window = SDL_CreateWindow(windowTitle, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 400, 480, SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE);
|
||||
|
||||
if (window == nullptr) {
|
||||
Helpers::panic("Window creation failed: %s", SDL_GetError());
|
||||
|
@ -59,7 +65,7 @@ FrontendSDL::FrontendSDL() : keyboardMappings(InputMappings::defaultKeyboardMapp
|
|||
|
||||
#ifdef PANDA3DS_ENABLE_VULKAN
|
||||
if (config.rendererType == RendererType::Vulkan) {
|
||||
window = SDL_CreateWindow("Alber", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 400, 480, SDL_WINDOW_VULKAN | SDL_WINDOW_RESIZABLE);
|
||||
window = SDL_CreateWindow(windowTitle, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 400, 480, SDL_WINDOW_VULKAN | SDL_WINDOW_RESIZABLE);
|
||||
|
||||
if (window == nullptr) {
|
||||
Helpers::warn("Window creation failed: %s", SDL_GetError());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue