mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-09 07:35:41 +12:00
Bonk
This commit is contained in:
parent
31d1c6ff3f
commit
c339c7d1c5
3 changed files with 5 additions and 5 deletions
|
@ -1,7 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <span>
|
#include <span>
|
||||||
#include <string>
|
|
||||||
#include <optional>
|
#include <optional>
|
||||||
|
|
||||||
#include "PICA/pica_vertex.hpp"
|
#include "PICA/pica_vertex.hpp"
|
||||||
|
@ -38,7 +37,7 @@ class Renderer {
|
||||||
|
|
||||||
static constexpr u32 vertexBufferSize = 0x10000;
|
static constexpr u32 vertexBufferSize = 0x10000;
|
||||||
static std::optional<RendererType> typeFromString(std::string inString);
|
static std::optional<RendererType> typeFromString(std::string inString);
|
||||||
static std::string typeToString(RendererType rendererType);
|
static const char* typeToString(RendererType rendererType);
|
||||||
|
|
||||||
virtual void reset() = 0;
|
virtual void reset() = 0;
|
||||||
virtual void display() = 0; // Display the 3DS screen contents to the window
|
virtual void display() = 0; // Display the 3DS screen contents to the window
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#include "config.hpp"
|
#include "config.hpp"
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
#include "helpers.hpp"
|
#include "helpers.hpp"
|
||||||
#include "toml.hpp"
|
#include "toml.hpp"
|
||||||
|
@ -68,7 +69,7 @@ void EmulatorConfig::save(const std::filesystem::path& path) {
|
||||||
}
|
}
|
||||||
|
|
||||||
data["GPU"]["EnableShaderJIT"] = shaderJitEnabled;
|
data["GPU"]["EnableShaderJIT"] = shaderJitEnabled;
|
||||||
data["GPU"]["Renderer"] = Renderer::typeToString(rendererType);
|
data["GPU"]["Renderer"] = std::string(Renderer::typeToString(rendererType));
|
||||||
|
|
||||||
std::ofstream file(path, std::ios::out);
|
std::ofstream file(path, std::ios::out);
|
||||||
file << data;
|
file << data;
|
||||||
|
|
|
@ -25,11 +25,11 @@ std::optional<RendererType> Renderer::typeFromString(std::string inString) {
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Renderer::typeToString(RendererType rendererType) {
|
const char* Renderer::typeToString(RendererType rendererType) {
|
||||||
switch (rendererType) {
|
switch (rendererType) {
|
||||||
case RendererType::Null: return "null";
|
case RendererType::Null: return "null";
|
||||||
case RendererType::OpenGL: return "opengl";
|
case RendererType::OpenGL: return "opengl";
|
||||||
case RendererType::Vulkan: return "vk";
|
case RendererType::Vulkan: return "vulkan";
|
||||||
default: return "Invalid";
|
default: return "Invalid";
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue