mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-01 16:05:07 +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 SHADER_DIR "shaders"
|
||||||
#define STATES_DIR "states"
|
#define STATES_DIR "states"
|
||||||
#define ICONS_DIR "icons"
|
#define ICONS_DIR "icons"
|
||||||
#define PLAY_TIME_DIR "play_time"
|
|
||||||
|
|
||||||
// Filenames
|
// Filenames
|
||||||
// Files in the directory returned by GetUserPath(UserPath::LogDir)
|
// Files in the directory returned by GetUserPath(UserPath::LogDir)
|
||||||
|
@ -729,7 +729,7 @@ static const std::string& GetHomeDirectory() {
|
|||||||
* @return The directory path
|
* @return The directory path
|
||||||
* @sa http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
* @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());
|
const char* directory = getenv(envvar.c_str());
|
||||||
|
|
||||||
std::string user_dir;
|
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::LoadDir, user_path + LOAD_DIR DIR_SEP);
|
||||||
g_paths.emplace(UserPath::StatesDir, user_path + STATES_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::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;
|
g_default_paths = g_paths;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
#include <ios>
|
#include <ios>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
#include <optional>
|
#include <optional>
|
||||||
|
#include <span>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <string_view>
|
#include <string_view>
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
@ -202,6 +203,8 @@ void UpdateUserPath(UserPath path, const std::string& filename);
|
|||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
[[nodiscard]] const std::string& GetExeDirectory();
|
[[nodiscard]] const std::string& GetExeDirectory();
|
||||||
[[nodiscard]] std::string AppDataRoamingDirectory();
|
[[nodiscard]] std::string AppDataRoamingDirectory();
|
||||||
|
#else
|
||||||
|
[[nodiscard]] const std::string GetUserDirectory(const std::string& envvar);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
std::size_t WriteStringToFile(bool text_file, const std::string& filename, std::string_view str);
|
std::size_t WriteStringToFile(bool text_file, const std::string& filename, std::string_view str);
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
#include "common/common_types.h"
|
||||||
#include "common/microprofile.h"
|
#include "common/microprofile.h"
|
||||||
|
|
||||||
class MicroProfileDialog : public QWidget {
|
class MicroProfileDialog : public QWidget {
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <QDockWidget>
|
#include <QDockWidget>
|
||||||
|
#include "common/common_types.h"
|
||||||
|
|
||||||
class QTreeWidget;
|
class QTreeWidget;
|
||||||
class QTreeWidgetItem;
|
class QTreeWidgetItem;
|
||||||
|
@ -14,7 +14,6 @@
|
|||||||
#include <QStyleOption>
|
#include <QStyleOption>
|
||||||
#include <QTime>
|
#include <QTime>
|
||||||
#include <fmt/format.h>
|
#include <fmt/format.h>
|
||||||
#include "citra_qt/util/util.h"
|
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "core/loader/loader.h"
|
#include "core/loader/loader.h"
|
||||||
#include "core/loader/smdh.h"
|
#include "core/loader/smdh.h"
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
#include <QtGui>
|
#include <QtGui>
|
||||||
#include <QtWidgets>
|
#include <QtWidgets>
|
||||||
#include <fmt/format.h>
|
#include <fmt/format.h>
|
||||||
|
#include <fmt/ostream.h>
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
#include <unistd.h> // for chdir
|
#include <unistd.h> // for chdir
|
||||||
#endif
|
#endif
|
||||||
@ -82,6 +83,7 @@
|
|||||||
#include "common/x64/cpu_detect.h"
|
#include "common/x64/cpu_detect.h"
|
||||||
#endif
|
#endif
|
||||||
#include "common/settings.h"
|
#include "common/settings.h"
|
||||||
|
#include "common/string_util.h"
|
||||||
#include "core/core.h"
|
#include "core/core.h"
|
||||||
#include "core/dumping/backend.h"
|
#include "core/dumping/backend.h"
|
||||||
#include "core/file_sys/archive_extsavedata.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);
|
out_icon_path = FileUtil::GetUserPath(FileUtil::UserPath::IconsDir);
|
||||||
ico_extension = "ico";
|
ico_extension = "ico";
|
||||||
#elif defined(__linux__) || defined(__FreeBSD__)
|
#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
|
#endif
|
||||||
// Create icons directory if it doesn't exist
|
// Create icons directory if it doesn't exist
|
||||||
if (!FileUtil::CreateDir(out_icon_path.string())) {
|
if (!FileUtil::CreateDir(out_icon_path.string())) {
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <filesystem>
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <QMainWindow>
|
#include <QMainWindow>
|
||||||
@ -22,6 +21,9 @@
|
|||||||
#include <QDBusObjectPath>
|
#include <QDBusObjectPath>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Needs to be included at the end due to https://bugreports.qt.io/browse/QTBUG-73263
|
||||||
|
#include <filesystem>
|
||||||
|
|
||||||
class AboutDialog;
|
class AboutDialog;
|
||||||
class Config;
|
class Config;
|
||||||
class ClickableLabel;
|
class ClickableLabel;
|
||||||
|
@ -148,6 +148,8 @@ struct Values {
|
|||||||
|
|
||||||
// logging
|
// logging
|
||||||
Settings::Setting<bool> show_console{false, "showConsole"};
|
Settings::Setting<bool> show_console{false, "showConsole"};
|
||||||
|
|
||||||
|
bool shortcut_already_warned = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern Values values;
|
extern Values values;
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
#include <array>
|
#include <array>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
|
#include "common/logging/log.h"
|
||||||
#include "core/loader/smdh.h"
|
#include "core/loader/smdh.h"
|
||||||
#include "lime_qt/util/util.h"
|
#include "lime_qt/util/util.h"
|
||||||
|
|
||||||
@ -43,7 +44,7 @@ QPixmap CreateCirclePixmapFromColor(const QColor& color) {
|
|||||||
return circle_pixmap;
|
return circle_pixmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
QPixmap GetQPixmapFromSMDH(std::vector<u8>& smdh_data) {
|
QPixmap GetQPixmapFromSMDH(const std::vector<u8>& smdh_data) {
|
||||||
Loader::SMDH smdh;
|
Loader::SMDH smdh;
|
||||||
std::memcpy(&smdh, smdh_data.data(), sizeof(Loader::SMDH));
|
std::memcpy(&smdh, smdh_data.data(), sizeof(Loader::SMDH));
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
#include <QFont>
|
#include <QFont>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
#include "common/common_types.h"
|
||||||
|
|
||||||
/// Returns a QFont object appropriate to use as a monospace font for debugging widgets, etc.
|
/// Returns a QFont object appropriate to use as a monospace font for debugging widgets, etc.
|
||||||
QFont GetMonospaceFont();
|
QFont GetMonospaceFont();
|
||||||
@ -26,7 +27,7 @@ QPixmap CreateCirclePixmapFromColor(const QColor& color);
|
|||||||
* @param smdh_data SMDH data
|
* @param smdh_data SMDH data
|
||||||
* @return QPixmap game icon
|
* @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
|
* Saves a windows icon to a file
|
||||||
|
Loading…
Reference in New Issue
Block a user