early-access version 2133
This commit is contained in:
parent
8018c187dc
commit
4141a45db7
7 changed files with 97 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
||||||
yuzu emulator early access
|
yuzu emulator early access
|
||||||
=============
|
=============
|
||||||
|
|
||||||
This is the source code for early-access 2132.
|
This is the source code for early-access 2133.
|
||||||
|
|
||||||
## Legal Notice
|
## Legal Notice
|
||||||
|
|
||||||
|
|
|
@ -524,7 +524,9 @@ private:
|
||||||
Disconnect = 11,
|
Disconnect = 11,
|
||||||
|
|
||||||
AllocateBuffers = 13,
|
AllocateBuffers = 13,
|
||||||
SetPreallocatedBuffer = 14
|
SetPreallocatedBuffer = 14,
|
||||||
|
|
||||||
|
GetBufferHistory = 17
|
||||||
};
|
};
|
||||||
|
|
||||||
void TransactParcel(Kernel::HLERequestContext& ctx) {
|
void TransactParcel(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -641,6 +643,14 @@ private:
|
||||||
ctx.WriteBuffer(response.Serialize());
|
ctx.WriteBuffer(response.Serialize());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case TransactionId::GetBufferHistory: {
|
||||||
|
LOG_WARNING(Service_VI, "(STUBBED) called, transaction=GetBufferHistory");
|
||||||
|
[[maybe_unused]] const auto buffer = ctx.ReadBuffer();
|
||||||
|
|
||||||
|
IGBPEmptyResponseParcel response{};
|
||||||
|
ctx.WriteBuffer(response.Serialize());
|
||||||
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
ASSERT_MSG(false, "Unimplemented");
|
ASSERT_MSG(false, "Unimplemented");
|
||||||
}
|
}
|
||||||
|
|
|
@ -285,6 +285,11 @@ if (USE_DISCORD_PRESENCE)
|
||||||
target_compile_definitions(yuzu PRIVATE -DUSE_DISCORD_PRESENCE)
|
target_compile_definitions(yuzu PRIVATE -DUSE_DISCORD_PRESENCE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||||
|
find_package(Qt5 ${QT_VERSION} REQUIRED COMPONENTS DBus ${QT_PREFIX_HINT} ${YUZU_QT_NO_CMAKE_SYSTEM_PATH} REQUIRED)
|
||||||
|
target_link_libraries(yuzu PRIVATE Qt5::DBus)
|
||||||
|
endif()
|
||||||
|
|
||||||
if (YUZU_USE_QT_WEB_ENGINE)
|
if (YUZU_USE_QT_WEB_ENGINE)
|
||||||
target_link_libraries(yuzu PRIVATE Qt5::WebEngineCore Qt5::WebEngineWidgets)
|
target_link_libraries(yuzu PRIVATE Qt5::WebEngineCore Qt5::WebEngineWidgets)
|
||||||
target_compile_definitions(yuzu PRIVATE -DYUZU_USE_QT_WEB_ENGINE)
|
target_compile_definitions(yuzu PRIVATE -DYUZU_USE_QT_WEB_ENGINE)
|
||||||
|
|
|
@ -48,6 +48,12 @@ static FileSys::VirtualFile VfsDirectoryCreateFileWrapper(const FileSys::Virtual
|
||||||
|
|
||||||
#define QT_NO_OPENGL
|
#define QT_NO_OPENGL
|
||||||
#include <QClipboard>
|
#include <QClipboard>
|
||||||
|
#ifdef __linux__
|
||||||
|
#include <QDBusConnection>
|
||||||
|
#include <QDBusError>
|
||||||
|
#include <QDBusInterface>
|
||||||
|
#include <QDBusReply>
|
||||||
|
#endif
|
||||||
#include <QDesktopServices>
|
#include <QDesktopServices>
|
||||||
#include <QDesktopWidget>
|
#include <QDesktopWidget>
|
||||||
#include <QDialogButtonBox>
|
#include <QDialogButtonBox>
|
||||||
|
@ -1220,12 +1226,72 @@ void GMainWindow::OnDisplayTitleBars(bool show) {
|
||||||
void GMainWindow::PreventOSSleep() {
|
void GMainWindow::PreventOSSleep() {
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
SetThreadExecutionState(ES_CONTINUOUS | ES_SYSTEM_REQUIRED | ES_DISPLAY_REQUIRED);
|
SetThreadExecutionState(ES_CONTINUOUS | ES_SYSTEM_REQUIRED | ES_DISPLAY_REQUIRED);
|
||||||
|
#elif defined(__linux__)
|
||||||
|
QDBusConnection bus = QDBusConnection::sessionBus();
|
||||||
|
if (bus.isConnected()) {
|
||||||
|
// Specs: https://specifications.freedesktop.org/idle-inhibit-spec/0.1/re01.html
|
||||||
|
const QString service = QStringLiteral("org.freedesktop.ScreenSaver");
|
||||||
|
const QString path = QStringLiteral("/org/freedesktop/ScreenSaver");
|
||||||
|
|
||||||
|
QDBusInterface screen_saver_interface(service, path, service, bus, this);
|
||||||
|
if (screen_saver_interface.isValid()) {
|
||||||
|
const QString method = QStringLiteral("Inhibit");
|
||||||
|
const QString application_name = QStringLiteral("org.yuzu-emu.Yuzu");
|
||||||
|
const QString reason_for_inhibit = QStringLiteral("Playing a game");
|
||||||
|
|
||||||
|
QDBusReply<uint32_t> reply =
|
||||||
|
screen_saver_interface.call(method, application_name, reason_for_inhibit);
|
||||||
|
|
||||||
|
if (reply.isValid()) {
|
||||||
|
screensaver_dbus_cookie = reply.value();
|
||||||
|
screensaver_inhibited = true;
|
||||||
|
|
||||||
|
LOG_INFO(Frontend, "Screen saver disabled successfully (cookie: {})",
|
||||||
|
screensaver_dbus_cookie);
|
||||||
|
} else {
|
||||||
|
QDBusError error = reply.error();
|
||||||
|
LOG_ERROR(Frontend, "Could not disable screen saver: {} {}",
|
||||||
|
error.message().toStdString(), error.name().toStdString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void GMainWindow::AllowOSSleep() {
|
void GMainWindow::AllowOSSleep() {
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
SetThreadExecutionState(ES_CONTINUOUS);
|
SetThreadExecutionState(ES_CONTINUOUS);
|
||||||
|
#elif defined(__linux__)
|
||||||
|
if (!screensaver_inhibited) {
|
||||||
|
LOG_WARNING(Frontend, "Screen saver already enabled.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDBusConnection bus = QDBusConnection::sessionBus();
|
||||||
|
if (bus.isConnected()) {
|
||||||
|
// Specs: https://specifications.freedesktop.org/idle-inhibit-spec/0.1/re01.html
|
||||||
|
const QString service = QStringLiteral("org.freedesktop.ScreenSaver");
|
||||||
|
const QString path = QStringLiteral("/org/freedesktop/ScreenSaver");
|
||||||
|
|
||||||
|
QDBusInterface screen_saver_interface(service, path, service, bus, this);
|
||||||
|
if (screen_saver_interface.isValid()) {
|
||||||
|
const QString method = QStringLiteral("UnInhibit");
|
||||||
|
|
||||||
|
QDBusReply<void> reply = screen_saver_interface.call(method, screensaver_dbus_cookie);
|
||||||
|
|
||||||
|
if (reply.isValid()) {
|
||||||
|
LOG_INFO(Frontend, "Screen saver enabled successfully (cookie: {})",
|
||||||
|
screensaver_dbus_cookie);
|
||||||
|
|
||||||
|
screensaver_dbus_cookie = 0;
|
||||||
|
screensaver_inhibited = false;
|
||||||
|
} else {
|
||||||
|
QDBusError error = reply.error();
|
||||||
|
LOG_ERROR(Frontend, "Could not disable screen saver: {} {}",
|
||||||
|
error.message().toStdString(), error.name().toStdString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -342,6 +342,11 @@ private:
|
||||||
bool auto_paused = false;
|
bool auto_paused = false;
|
||||||
QTimer mouse_hide_timer;
|
QTimer mouse_hide_timer;
|
||||||
|
|
||||||
|
#ifdef __linux__
|
||||||
|
bool screensaver_inhibited = false;
|
||||||
|
uint32_t screensaver_dbus_cookie;
|
||||||
|
#endif
|
||||||
|
|
||||||
// FS
|
// FS
|
||||||
std::shared_ptr<FileSys::VfsFilesystem> vfs;
|
std::shared_ptr<FileSys::VfsFilesystem> vfs;
|
||||||
std::unique_ptr<FileSys::ManualContentProvider> provider;
|
std::unique_ptr<FileSys::ManualContentProvider> provider;
|
||||||
|
|
|
@ -518,6 +518,9 @@ void Config::ReadValues() {
|
||||||
ReadSetting("WebService", Settings::values.web_api_url);
|
ReadSetting("WebService", Settings::values.web_api_url);
|
||||||
ReadSetting("WebService", Settings::values.yuzu_username);
|
ReadSetting("WebService", Settings::values.yuzu_username);
|
||||||
ReadSetting("WebService", Settings::values.yuzu_token);
|
ReadSetting("WebService", Settings::values.yuzu_token);
|
||||||
|
|
||||||
|
// Network
|
||||||
|
ReadSetting("Network", Settings::values.network_interface);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Config::Reload() {
|
void Config::Reload() {
|
||||||
|
|
|
@ -428,6 +428,12 @@ web_api_url = https://api.yuzu-emu.org
|
||||||
yuzu_username =
|
yuzu_username =
|
||||||
yuzu_token =
|
yuzu_token =
|
||||||
|
|
||||||
|
[Network]
|
||||||
|
# Name of the network interface device to use with yuzu LAN play.
|
||||||
|
# e.g. On *nix: 'enp7s0', 'wlp6s0u1u3u3', 'lo'
|
||||||
|
# e.g. On Windows: 'Ethernet', 'Wi-Fi'
|
||||||
|
network_interface =
|
||||||
|
|
||||||
[AddOns]
|
[AddOns]
|
||||||
# Used to disable add-ons
|
# Used to disable add-ons
|
||||||
# List of title IDs of games that will have add-ons disabled (separated by '|'):
|
# List of title IDs of games that will have add-ons disabled (separated by '|'):
|
||||||
|
|
Loading…
Reference in a new issue