diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/hle/service/am/am.cpp | 12 | ||||
-rw-r--r-- | src/core/hle/service/am/am.h | 1 | ||||
-rw-r--r-- | src/core/hle/service/pm/pm.cpp | 13 | ||||
-rw-r--r-- | src/core/hle/service/pm/pm.h | 2 | ||||
-rw-r--r-- | src/video_core/engines/shader_bytecode.h | 6 | ||||
-rw-r--r-- | src/yuzu/main.cpp | 22 |
6 files changed, 42 insertions, 14 deletions
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index 78d551a8a..7e3cf6d58 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp @@ -18,6 +18,7 @@ #include "core/hle/service/apm/apm.h" #include "core/hle/service/filesystem/filesystem.h" #include "core/hle/service/nvflinger/nvflinger.h" +#include "core/hle/service/pm/pm.h" #include "core/hle/service/set/set.h" #include "core/settings.h" @@ -309,7 +310,7 @@ ICommonStateGetter::ICommonStateGetter() : ServiceFramework("ICommonStateGetter" {5, &ICommonStateGetter::GetOperationMode, "GetOperationMode"}, {6, &ICommonStateGetter::GetPerformanceMode, "GetPerformanceMode"}, {7, nullptr, "GetCradleStatus"}, - {8, nullptr, "GetBootMode"}, + {8, &ICommonStateGetter::GetBootMode, "GetBootMode"}, {9, &ICommonStateGetter::GetCurrentFocusState, "GetCurrentFocusState"}, {10, nullptr, "RequestToAcquireSleepLock"}, {11, nullptr, "ReleaseSleepLock"}, @@ -334,6 +335,15 @@ ICommonStateGetter::ICommonStateGetter() : ServiceFramework("ICommonStateGetter" event = Kernel::Event::Create(Kernel::ResetType::OneShot, "ICommonStateGetter:Event"); } +void ICommonStateGetter::GetBootMode(Kernel::HLERequestContext& ctx) { + IPC::ResponseBuilder rb{ctx, 3}; + rb.Push(RESULT_SUCCESS); + + rb.Push<u8>(static_cast<u8>(Service::PM::SystemBootMode::Normal)); // Normal boot mode + + LOG_DEBUG(Service_AM, "called"); +} + void ICommonStateGetter::GetEventHandle(Kernel::HLERequestContext& ctx) { event->Signal(); diff --git a/src/core/hle/service/am/am.h b/src/core/hle/service/am/am.h index b763aff6f..9e8bb4e43 100644 --- a/src/core/hle/service/am/am.h +++ b/src/core/hle/service/am/am.h @@ -116,6 +116,7 @@ private: void GetDefaultDisplayResolutionChangeEvent(Kernel::HLERequestContext& ctx); void GetOperationMode(Kernel::HLERequestContext& ctx); void GetPerformanceMode(Kernel::HLERequestContext& ctx); + void GetBootMode(Kernel::HLERequestContext& ctx); Kernel::SharedPtr<Kernel::Event> event; }; diff --git a/src/core/hle/service/pm/pm.cpp b/src/core/hle/service/pm/pm.cpp index e20a25689..6ec35ca60 100644 --- a/src/core/hle/service/pm/pm.cpp +++ b/src/core/hle/service/pm/pm.cpp @@ -2,6 +2,8 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. +#include "core/hle/ipc_helpers.h" +#include "core/hle/service/pm/pm.h" #include "core/hle/service/service.h" namespace Service::PM { @@ -10,11 +12,20 @@ class BootMode final : public ServiceFramework<BootMode> { public: explicit BootMode() : ServiceFramework{"pm:bm"} { static const FunctionInfo functions[] = { - {0, nullptr, "GetBootMode"}, + {0, &BootMode::GetBootMode, "GetBootMode"}, {1, nullptr, "SetMaintenanceBoot"}, }; RegisterHandlers(functions); } + +private: + void GetBootMode(Kernel::HLERequestContext& ctx) { + IPC::ResponseBuilder rb{ctx, 3}; + rb.Push(RESULT_SUCCESS); + rb.Push<u32>(static_cast<u32>(SystemBootMode::Normal)); // Normal boot mode + + LOG_DEBUG(Service_PM, "called"); + } }; class DebugMonitor final : public ServiceFramework<DebugMonitor> { diff --git a/src/core/hle/service/pm/pm.h b/src/core/hle/service/pm/pm.h index 9fc19fed6..370f2ed72 100644 --- a/src/core/hle/service/pm/pm.h +++ b/src/core/hle/service/pm/pm.h @@ -9,7 +9,7 @@ class ServiceManager; } namespace Service::PM { - +enum class SystemBootMode : u32 { Normal = 0, Maintenance = 1 }; /// Registers all PM services with the specified service manager. void InstallInterfaces(SM::ServiceManager& service_manager); diff --git a/src/video_core/engines/shader_bytecode.h b/src/video_core/engines/shader_bytecode.h index a36df65f9..7fd622159 100644 --- a/src/video_core/engines/shader_bytecode.h +++ b/src/video_core/engines/shader_bytecode.h @@ -636,6 +636,9 @@ public: IADD_C, IADD_R, IADD_IMM, + IADD3_C, + IADD3_R, + IADD3_IMM, IADD32I, ISCADD_C, // Scale and Add ISCADD_R, @@ -854,6 +857,9 @@ private: INST("0100110000010---", Id::IADD_C, Type::ArithmeticInteger, "IADD_C"), INST("0101110000010---", Id::IADD_R, Type::ArithmeticInteger, "IADD_R"), INST("0011100-00010---", Id::IADD_IMM, Type::ArithmeticInteger, "IADD_IMM"), + INST("010011001100----", Id::IADD3_C, Type::ArithmeticInteger, "IADD3_C"), + INST("010111001100----", Id::IADD3_R, Type::ArithmeticInteger, "IADD3_R"), + INST("0011100-1100----", Id::IADD3_IMM, Type::ArithmeticInteger, "IADD3_IMM"), INST("0001110---------", Id::IADD32I, Type::ArithmeticIntegerImmediate, "IADD32I"), INST("0100110000011---", Id::ISCADD_C, Type::ArithmeticInteger, "ISCADD_C"), INST("0101110000011---", Id::ISCADD_R, Type::ArithmeticInteger, "ISCADD_R"), diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index b3a7bba0c..53410fb91 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -91,9 +91,20 @@ void GMainWindow::ShowCallouts() {} const int GMainWindow::max_recent_files_item; +static void InitializeLogging() { + Log::Filter log_filter; + log_filter.ParseFilterString(Settings::values.log_filter); + Log::SetGlobalFilter(log_filter); + + const std::string& log_dir = FileUtil::GetUserPath(FileUtil::UserPath::LogDir); + FileUtil::CreateFullPath(log_dir); + Log::AddBackend(std::make_unique<Log::FileBackend>(log_dir + LOG_FILE)); +} + GMainWindow::GMainWindow() : config(new Config()), emu_thread(nullptr), vfs(std::make_shared<FileSys::RealVfsFilesystem>()) { + InitializeLogging(); debug_context = Tegra::DebugContext::Construct(); @@ -1184,16 +1195,6 @@ void GMainWindow::UpdateUITheme() { #undef main #endif -static void InitializeLogging() { - Log::Filter log_filter; - log_filter.ParseFilterString(Settings::values.log_filter); - Log::SetGlobalFilter(log_filter); - - const std::string& log_dir = FileUtil::GetUserPath(FileUtil::UserPath::LogDir); - FileUtil::CreateFullPath(log_dir); - Log::AddBackend(std::make_unique<Log::FileBackend>(log_dir + LOG_FILE)); -} - int main(int argc, char* argv[]) { MicroProfileOnThreadCreate("Frontend"); SCOPE_EXIT({ MicroProfileShutdown(); }); @@ -1211,7 +1212,6 @@ int main(int argc, char* argv[]) { GMainWindow main_window; // After settings have been loaded by GMainWindow, apply the filter - InitializeLogging(); main_window.show(); return app.exec(); } |