mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-26 11:34:18 +01:00
lime_qt: Fix remaining build errors
Co-Authored-By: FearlessTobi <thm.frey@gmail.com>
This commit is contained in:
parent
b4662a822b
commit
f2a8ab5547
@ -53,7 +53,6 @@
|
||||
#define SHADER_DIR "shaders"
|
||||
#define STATES_DIR "states"
|
||||
#define ICONS_DIR "icons"
|
||||
#define PLAY_TIME_DIR "play_time"
|
||||
|
||||
// Filenames
|
||||
// Files in the directory returned by GetUserPath(UserPath::LogDir)
|
||||
|
@ -729,7 +729,7 @@ static const std::string& GetHomeDirectory() {
|
||||
* @return The directory path
|
||||
* @sa http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
||||
*/
|
||||
[[maybe_unused]] static const std::string GetUserDirectory(const std::string& envvar) {
|
||||
[[maybe_unused]] const std::string GetUserDirectory(const std::string& envvar) {
|
||||
const char* directory = getenv(envvar.c_str());
|
||||
|
||||
std::string user_dir;
|
||||
@ -827,7 +827,7 @@ void SetUserPath(const std::string& path) {
|
||||
g_paths.emplace(UserPath::LoadDir, user_path + LOAD_DIR DIR_SEP);
|
||||
g_paths.emplace(UserPath::StatesDir, user_path + STATES_DIR DIR_SEP);
|
||||
g_paths.emplace(UserPath::IconsDir, user_path + ICONS_DIR DIR_SEP);
|
||||
g_paths.emplace(UserPath::PlayTimeDir, user_path + PLAY_TIME_DIR DIR_SEP);
|
||||
g_paths.emplace(UserPath::PlayTimeDir, user_path + LOG_DIR DIR_SEP);
|
||||
g_default_paths = g_paths;
|
||||
}
|
||||
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include <ios>
|
||||
#include <limits>
|
||||
#include <optional>
|
||||
#include <span>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <type_traits>
|
||||
@ -202,6 +203,8 @@ void UpdateUserPath(UserPath path, const std::string& filename);
|
||||
#ifdef _WIN32
|
||||
[[nodiscard]] const std::string& GetExeDirectory();
|
||||
[[nodiscard]] std::string AppDataRoamingDirectory();
|
||||
#else
|
||||
[[nodiscard]] const std::string GetUserDirectory(const std::string& envvar);
|
||||
#endif
|
||||
|
||||
std::size_t WriteStringToFile(bool text_file, const std::string& filename, std::string_view str);
|
||||
|
@ -25,7 +25,7 @@ namespace Core {
|
||||
class ARM_Interface : NonCopyable {
|
||||
public:
|
||||
explicit ARM_Interface(u32 id, std::shared_ptr<Core::Timing::Timer> timer)
|
||||
: timer(timer), id(id){};
|
||||
: timer(timer), id(id) {};
|
||||
virtual ~ARM_Interface() {}
|
||||
|
||||
struct ThreadContext {
|
||||
|
@ -251,7 +251,7 @@ public:
|
||||
|
||||
explicit Timing(std::size_t num_cores, u32 cpu_clock_percentage, s64 override_base_ticks = -1);
|
||||
|
||||
~Timing(){};
|
||||
~Timing() {};
|
||||
|
||||
/**
|
||||
* Returns the event_type identifier. if name is not unique, it will assert.
|
||||
|
@ -281,7 +281,7 @@ void Module::Interface::GetLastResponseResult(Kernel::HLERequestContext& ctx) {
|
||||
rb.Push(ResultSuccess);
|
||||
}
|
||||
|
||||
Module::Module(Core::System& system) : system(system){};
|
||||
Module::Module(Core::System& system) : system(system) {};
|
||||
Module::~Module() = default;
|
||||
|
||||
void InstallInterfaces(Core::System& system) {
|
||||
|
@ -183,7 +183,7 @@ public:
|
||||
};
|
||||
|
||||
struct RequestHeader {
|
||||
RequestHeader(std::string name, std::string value) : name(name), value(value){};
|
||||
RequestHeader(std::string name, std::string value) : name(name), value(value) {};
|
||||
std::string name;
|
||||
std::string value;
|
||||
|
||||
@ -213,10 +213,10 @@ public:
|
||||
|
||||
struct Param {
|
||||
Param(const std::vector<u8>& value)
|
||||
: name(value.begin(), value.end()), value(value.begin(), value.end()){};
|
||||
Param(const std::string& name, const std::string& value) : name(name), value(value){};
|
||||
: name(value.begin(), value.end()), value(value.begin(), value.end()) {};
|
||||
Param(const std::string& name, const std::string& value) : name(name), value(value) {};
|
||||
Param(const std::string& name, const std::vector<u8>& value)
|
||||
: name(name), value(value.begin(), value.end()), is_binary(true){};
|
||||
: name(name), value(value.begin(), value.end()), is_binary(true) {};
|
||||
std::string name;
|
||||
std::string value;
|
||||
bool is_binary = false;
|
||||
|
@ -5,6 +5,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <QWidget>
|
||||
#include "common/common_types.h"
|
||||
#include "common/microprofile.h"
|
||||
|
||||
class MicroProfileDialog : public QWidget {
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
#include <memory>
|
||||
#include <QDockWidget>
|
||||
#include "common/common_types.h"
|
||||
|
||||
class QTreeWidget;
|
||||
class QTreeWidgetItem;
|
||||
|
@ -14,7 +14,6 @@
|
||||
#include <QStyleOption>
|
||||
#include <QTime>
|
||||
#include <fmt/format.h>
|
||||
#include "citra_qt/util/util.h"
|
||||
#include "common/logging/log.h"
|
||||
#include "core/loader/loader.h"
|
||||
#include "core/loader/smdh.h"
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include <QtGui>
|
||||
#include <QtWidgets>
|
||||
#include <fmt/format.h>
|
||||
#include <fmt/ostream.h>
|
||||
#ifdef __APPLE__
|
||||
#include <unistd.h> // for chdir
|
||||
#endif
|
||||
@ -82,6 +83,7 @@
|
||||
#include "common/x64/cpu_detect.h"
|
||||
#endif
|
||||
#include "common/settings.h"
|
||||
#include "common/string_util.h"
|
||||
#include "core/core.h"
|
||||
#include "core/dumping/backend.h"
|
||||
#include "core/file_sys/archive_extsavedata.h"
|
||||
@ -1805,7 +1807,7 @@ bool GMainWindow::MakeShortcutIcoPath(const u64 program_id, const std::string_vi
|
||||
out_icon_path = FileUtil::GetUserPath(FileUtil::UserPath::IconsDir);
|
||||
ico_extension = "ico";
|
||||
#elif defined(__linux__) || defined(__FreeBSD__)
|
||||
out_icon_path = FileUtil::GetDataDirectory("XDG_DATA_HOME") / "icons/hicolor/256x256";
|
||||
out_icon_path = FileUtil::GetUserDirectory("XDG_DATA_HOME") + "icons/hicolor/256x256";
|
||||
#endif
|
||||
// Create icons directory if it doesn't exist
|
||||
if (!FileUtil::CreateDir(out_icon_path.string())) {
|
||||
|
@ -5,7 +5,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
#include <filesystem>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include <QMainWindow>
|
||||
@ -22,6 +21,9 @@
|
||||
#include <QDBusObjectPath>
|
||||
#endif
|
||||
|
||||
// Needs to be included at the end due to https://bugreports.qt.io/browse/QTBUG-73263
|
||||
#include <filesystem>
|
||||
|
||||
class AboutDialog;
|
||||
class Config;
|
||||
class ClickableLabel;
|
||||
|
@ -148,6 +148,8 @@ struct Values {
|
||||
|
||||
// logging
|
||||
Settings::Setting<bool> show_console{false, "showConsole"};
|
||||
|
||||
bool shortcut_already_warned = false;
|
||||
};
|
||||
|
||||
extern Values values;
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include <array>
|
||||
#include <cmath>
|
||||
#include <QPainter>
|
||||
#include "common/logging/log.h"
|
||||
#include "core/loader/smdh.h"
|
||||
#include "lime_qt/util/util.h"
|
||||
|
||||
@ -43,7 +44,7 @@ QPixmap CreateCirclePixmapFromColor(const QColor& color) {
|
||||
return circle_pixmap;
|
||||
}
|
||||
|
||||
QPixmap GetQPixmapFromSMDH(std::vector<u8>& smdh_data) {
|
||||
QPixmap GetQPixmapFromSMDH(const std::vector<u8>& smdh_data) {
|
||||
Loader::SMDH smdh;
|
||||
std::memcpy(&smdh, smdh_data.data(), sizeof(Loader::SMDH));
|
||||
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include <filesystem>
|
||||
#include <QFont>
|
||||
#include <QString>
|
||||
#include "common/common_types.h"
|
||||
|
||||
/// Returns a QFont object appropriate to use as a monospace font for debugging widgets, etc.
|
||||
QFont GetMonospaceFont();
|
||||
@ -26,7 +27,7 @@ QPixmap CreateCirclePixmapFromColor(const QColor& color);
|
||||
* @param smdh_data SMDH data
|
||||
* @return QPixmap game icon
|
||||
*/
|
||||
QPixmap GetQPixmapFromSMDH(std::vector<u8>& smdh_data);
|
||||
QPixmap GetQPixmapFromSMDH(const std::vector<u8>& smdh_data);
|
||||
|
||||
/**
|
||||
* Saves a windows icon to a file
|
||||
@ -34,4 +35,4 @@ QPixmap GetQPixmapFromSMDH(std::vector<u8>& smdh_data);
|
||||
* @param image The image to save
|
||||
* @return bool If the operation succeeded
|
||||
*/
|
||||
[[nodiscard]] bool SaveIconToFile(const std::filesystem::path& icon_path, const QImage& image);
|
||||
[[nodiscard]] bool SaveIconToFile(const std::filesystem::path& icon_path, const QImage& image);
|
||||
|
Loading…
Reference in New Issue
Block a user