From 12c1766997f2596b4b1b1a6a411e4f6d56605ee7 Mon Sep 17 00:00:00 2001 From: Morph <39850852+Morph1984@users.noreply.github.com> Date: Fri, 21 May 2021 01:05:04 -0400 Subject: general: Replace RESULT_SUCCESS with ResultSuccess Transition to PascalCase for result names. --- src/core/hle/service/audio/audctl.cpp | 4 ++-- src/core/hle/service/audio/audin_u.cpp | 6 ++--- src/core/hle/service/audio/audout_u.cpp | 26 ++++++++++---------- src/core/hle/service/audio/audren_u.cpp | 42 ++++++++++++++++----------------- src/core/hle/service/audio/hwopus.cpp | 6 ++--- 5 files changed, 42 insertions(+), 42 deletions(-) (limited to 'src/core/hle/service/audio') diff --git a/src/core/hle/service/audio/audctl.cpp b/src/core/hle/service/audio/audctl.cpp index 84890be72..8c4c49b85 100644 --- a/src/core/hle/service/audio/audctl.cpp +++ b/src/core/hle/service/audio/audctl.cpp @@ -57,7 +57,7 @@ void AudCtl::GetTargetVolumeMin(Kernel::HLERequestContext& ctx) { constexpr s32 target_min_volume = 0; IPC::ResponseBuilder rb{ctx, 3}; - rb.Push(RESULT_SUCCESS); + rb.Push(ResultSuccess); rb.Push(target_min_volume); } @@ -69,7 +69,7 @@ void AudCtl::GetTargetVolumeMax(Kernel::HLERequestContext& ctx) { constexpr s32 target_max_volume = 15; IPC::ResponseBuilder rb{ctx, 3}; - rb.Push(RESULT_SUCCESS); + rb.Push(ResultSuccess); rb.Push(target_max_volume); } diff --git a/src/core/hle/service/audio/audin_u.cpp b/src/core/hle/service/audio/audin_u.cpp index ecd05e4a6..3e7fd6024 100644 --- a/src/core/hle/service/audio/audin_u.cpp +++ b/src/core/hle/service/audio/audin_u.cpp @@ -70,7 +70,7 @@ void AudInU::ListAudioIns(Kernel::HLERequestContext& ctx) { ctx.WriteBuffer(device_names); IPC::ResponseBuilder rb{ctx, 3}; - rb.Push(RESULT_SUCCESS); + rb.Push(ResultSuccess); rb.Push(static_cast(device_names.size())); } @@ -82,7 +82,7 @@ void AudInU::ListAudioInsAutoFiltered(Kernel::HLERequestContext& ctx) { // device listing just omits the default input device IPC::ResponseBuilder rb{ctx, 3}; - rb.Push(RESULT_SUCCESS); + rb.Push(ResultSuccess); rb.Push(static_cast(device_count)); } @@ -94,7 +94,7 @@ void AudInU::OpenInOutImpl(Kernel::HLERequestContext& ctx) { params.state = State::Started; IPC::ResponseBuilder rb{ctx, 6, 0, 1}; - rb.Push(RESULT_SUCCESS); + rb.Push(ResultSuccess); rb.PushRaw(params); rb.PushIpcInterface(system); } diff --git a/src/core/hle/service/audio/audout_u.cpp b/src/core/hle/service/audio/audout_u.cpp index e1ae726f5..804c6b10c 100644 --- a/src/core/hle/service/audio/audout_u.cpp +++ b/src/core/hle/service/audio/audout_u.cpp @@ -91,7 +91,7 @@ private: LOG_DEBUG(Service_Audio, "called"); IPC::ResponseBuilder rb{ctx, 3}; - rb.Push(RESULT_SUCCESS); + rb.Push(ResultSuccess); rb.Push(static_cast(stream->IsPlaying() ? AudioState::Started : AudioState::Stopped)); } @@ -107,7 +107,7 @@ private: audio_core.StartStream(stream); IPC::ResponseBuilder rb{ctx, 2}; - rb.Push(RESULT_SUCCESS); + rb.Push(ResultSuccess); } void StopAudioOut(Kernel::HLERequestContext& ctx) { @@ -118,14 +118,14 @@ private: } IPC::ResponseBuilder rb{ctx, 2}; - rb.Push(RESULT_SUCCESS); + rb.Push(ResultSuccess); } void RegisterBufferEvent(Kernel::HLERequestContext& ctx) { LOG_DEBUG(Service_Audio, "called"); IPC::ResponseBuilder rb{ctx, 2, 1}; - rb.Push(RESULT_SUCCESS); + rb.Push(ResultSuccess); rb.PushCopyObjects(buffer_event.GetReadableEvent()); } @@ -150,7 +150,7 @@ private: } IPC::ResponseBuilder rb{ctx, 2}; - rb.Push(RESULT_SUCCESS); + rb.Push(ResultSuccess); } void GetReleasedAudioOutBufferImpl(Kernel::HLERequestContext& ctx) { @@ -164,7 +164,7 @@ private: ctx.WriteBuffer(tags); IPC::ResponseBuilder rb{ctx, 3}; - rb.Push(RESULT_SUCCESS); + rb.Push(ResultSuccess); rb.Push(static_cast(released_buffers.size())); } @@ -174,7 +174,7 @@ private: IPC::RequestParser rp{ctx}; const u64 tag{rp.Pop()}; IPC::ResponseBuilder rb{ctx, 3}; - rb.Push(RESULT_SUCCESS); + rb.Push(ResultSuccess); rb.Push(stream->ContainsBuffer(tag)); } @@ -182,7 +182,7 @@ private: LOG_DEBUG(Service_Audio, "called"); IPC::ResponseBuilder rb{ctx, 3}; - rb.Push(RESULT_SUCCESS); + rb.Push(ResultSuccess); rb.Push(static_cast(stream->GetQueueSize())); } @@ -190,7 +190,7 @@ private: LOG_DEBUG(Service_Audio, "called"); IPC::ResponseBuilder rb{ctx, 3}; - rb.Push(RESULT_SUCCESS); + rb.Push(ResultSuccess); rb.Push(stream->Flush()); } @@ -202,14 +202,14 @@ private: stream->SetVolume(volume); IPC::ResponseBuilder rb{ctx, 2}; - rb.Push(RESULT_SUCCESS); + rb.Push(ResultSuccess); } void GetAudioOutVolume(Kernel::HLERequestContext& ctx) { LOG_DEBUG(Service_Audio, "called"); IPC::ResponseBuilder rb{ctx, 3}; - rb.Push(RESULT_SUCCESS); + rb.Push(ResultSuccess); rb.Push(stream->GetVolume()); } @@ -246,7 +246,7 @@ void AudOutU::ListAudioOutsImpl(Kernel::HLERequestContext& ctx) { ctx.WriteBuffer(DefaultDevice); IPC::ResponseBuilder rb{ctx, 3}; - rb.Push(RESULT_SUCCESS); + rb.Push(ResultSuccess); rb.Push(1); // Amount of audio devices } @@ -279,7 +279,7 @@ void AudOutU::OpenAudioOutImpl(Kernel::HLERequestContext& ctx) { system, params, *audio_core, std::move(device_name), std::move(unique_name)); IPC::ResponseBuilder rb{ctx, 6, 0, 1}; - rb.Push(RESULT_SUCCESS); + rb.Push(ResultSuccess); rb.Push(DefaultSampleRate); rb.Push(params.channel_count); rb.Push(static_cast(AudioCore::Codec::PcmFormat::Int16)); diff --git a/src/core/hle/service/audio/audren_u.cpp b/src/core/hle/service/audio/audren_u.cpp index ae4284adf..800feba6e 100644 --- a/src/core/hle/service/audio/audren_u.cpp +++ b/src/core/hle/service/audio/audren_u.cpp @@ -65,7 +65,7 @@ private: LOG_DEBUG(Service_Audio, "called"); IPC::ResponseBuilder rb{ctx, 3}; - rb.Push(RESULT_SUCCESS); + rb.Push(ResultSuccess); rb.Push(renderer->GetSampleRate()); } @@ -73,7 +73,7 @@ private: LOG_DEBUG(Service_Audio, "called"); IPC::ResponseBuilder rb{ctx, 3}; - rb.Push(RESULT_SUCCESS); + rb.Push(ResultSuccess); rb.Push(renderer->GetSampleCount()); } @@ -81,7 +81,7 @@ private: LOG_DEBUG(Service_Audio, "called"); IPC::ResponseBuilder rb{ctx, 3}; - rb.Push(RESULT_SUCCESS); + rb.Push(ResultSuccess); rb.Push(static_cast(renderer->GetStreamState())); } @@ -89,7 +89,7 @@ private: LOG_DEBUG(Service_Audio, "called"); IPC::ResponseBuilder rb{ctx, 3}; - rb.Push(RESULT_SUCCESS); + rb.Push(ResultSuccess); rb.Push(renderer->GetMixBufferCount()); } @@ -112,7 +112,7 @@ private: IPC::ResponseBuilder rb{ctx, 2}; - rb.Push(RESULT_SUCCESS); + rb.Push(ResultSuccess); } void Stop(Kernel::HLERequestContext& ctx) { @@ -120,14 +120,14 @@ private: IPC::ResponseBuilder rb{ctx, 2}; - rb.Push(RESULT_SUCCESS); + rb.Push(ResultSuccess); } void QuerySystemEvent(Kernel::HLERequestContext& ctx) { LOG_WARNING(Service_Audio, "(STUBBED) called"); IPC::ResponseBuilder rb{ctx, 2, 1}; - rb.Push(RESULT_SUCCESS); + rb.Push(ResultSuccess); rb.PushCopyObjects(system_event.GetReadableEvent()); } @@ -140,14 +140,14 @@ private: ASSERT(rendering_time_limit_percent <= 100); IPC::ResponseBuilder rb{ctx, 2}; - rb.Push(RESULT_SUCCESS); + rb.Push(ResultSuccess); } void GetRenderingTimeLimit(Kernel::HLERequestContext& ctx) { LOG_DEBUG(Service_Audio, "called"); IPC::ResponseBuilder rb{ctx, 3}; - rb.Push(RESULT_SUCCESS); + rb.Push(ResultSuccess); rb.Push(rendering_time_limit_percent); } @@ -230,7 +230,7 @@ private: ctx.WriteBuffer(name_buffer); IPC::ResponseBuilder rb{ctx, 3}; - rb.Push(RESULT_SUCCESS); + rb.Push(ResultSuccess); rb.Push(static_cast(name_buffer.size())); } @@ -244,7 +244,7 @@ private: LOG_WARNING(Service_Audio, "(STUBBED) called. name={}, volume={}", name, volume); IPC::ResponseBuilder rb{ctx, 2}; - rb.Push(RESULT_SUCCESS); + rb.Push(ResultSuccess); } void GetAudioDeviceOutputVolume(Kernel::HLERequestContext& ctx) { @@ -254,7 +254,7 @@ private: LOG_WARNING(Service_Audio, "(STUBBED) called. name={}", name); IPC::ResponseBuilder rb{ctx, 3}; - rb.Push(RESULT_SUCCESS); + rb.Push(ResultSuccess); rb.Push(1.0f); } @@ -270,7 +270,7 @@ private: ctx.WriteBuffer(out_device_name); IPC::ResponseBuilder rb{ctx, 2}; - rb.Push(RESULT_SUCCESS); + rb.Push(ResultSuccess); } void QueryAudioDeviceSystemEvent(Kernel::HLERequestContext& ctx) { @@ -279,7 +279,7 @@ private: buffer_event.GetWritableEvent().Signal(); IPC::ResponseBuilder rb{ctx, 2, 1}; - rb.Push(RESULT_SUCCESS); + rb.Push(ResultSuccess); rb.PushCopyObjects(buffer_event.GetReadableEvent()); } @@ -287,7 +287,7 @@ private: LOG_WARNING(Service_Audio, "(STUBBED) called"); IPC::ResponseBuilder rb{ctx, 3}; - rb.Push(RESULT_SUCCESS); + rb.Push(ResultSuccess); rb.Push(1); } @@ -296,7 +296,7 @@ private: LOG_WARNING(Service_Audio, "(STUBBED) called"); IPC::ResponseBuilder rb{ctx, 2, 1}; - rb.Push(RESULT_SUCCESS); + rb.Push(ResultSuccess); rb.PushCopyObjects(buffer_event.GetReadableEvent()); } @@ -304,7 +304,7 @@ private: LOG_DEBUG(Service_Audio, "called"); IPC::ResponseBuilder rb{ctx, 2, 1}; - rb.Push(RESULT_SUCCESS); + rb.Push(ResultSuccess); rb.PushCopyObjects(buffer_event.GetReadableEvent()); } @@ -636,7 +636,7 @@ void AudRenU::GetAudioRendererWorkBufferSize(Kernel::HLERequestContext& ctx) { size = Common::AlignUp(size, 4096); IPC::ResponseBuilder rb{ctx, 4}; - rb.Push(RESULT_SUCCESS); + rb.Push(ResultSuccess); rb.Push(size); LOG_DEBUG(Service_Audio, "buffer_size=0x{:X}", size); @@ -651,7 +651,7 @@ void AudRenU::GetAudioDeviceService(Kernel::HLERequestContext& ctx) { // Revisionless variant of GetAudioDeviceServiceWithRevisionInfo that // always assumes the initial release revision (REV1). IPC::ResponseBuilder rb{ctx, 2, 0, 1}; - rb.Push(RESULT_SUCCESS); + rb.Push(ResultSuccess); rb.PushIpcInterface(system, buffer_event, Common::MakeMagic('R', 'E', 'V', '1')); } @@ -673,7 +673,7 @@ void AudRenU::GetAudioDeviceServiceWithRevisionInfo(Kernel::HLERequestContext& c LOG_DEBUG(Service_Audio, "called. revision={:08X}, aruid={:016X}", revision, aruid); IPC::ResponseBuilder rb{ctx, 2, 0, 1}; - rb.Push(RESULT_SUCCESS); + rb.Push(ResultSuccess); rb.PushIpcInterface(system, buffer_event, revision); } @@ -682,7 +682,7 @@ void AudRenU::OpenAudioRendererImpl(Kernel::HLERequestContext& ctx) { const auto params = rp.PopRaw(); IPC::ResponseBuilder rb{ctx, 2, 0, 1}; - rb.Push(RESULT_SUCCESS); + rb.Push(ResultSuccess); rb.PushIpcInterface(system, params, audren_instance_count++); } diff --git a/src/core/hle/service/audio/hwopus.cpp b/src/core/hle/service/audio/hwopus.cpp index ee5ec8cd6..4e534edac 100644 --- a/src/core/hle/service/audio/hwopus.cpp +++ b/src/core/hle/service/audio/hwopus.cpp @@ -86,7 +86,7 @@ private: const u32 param_size = performance != nullptr ? 6 : 4; IPC::ResponseBuilder rb{ctx, param_size}; - rb.Push(RESULT_SUCCESS); + rb.Push(ResultSuccess); rb.Push(consumed); rb.Push(sample_count); if (performance) { @@ -249,7 +249,7 @@ void HwOpus::GetWorkBufferSize(Kernel::HLERequestContext& ctx) { LOG_DEBUG(Audio, "worker_buffer_sz={}", worker_buffer_sz); IPC::ResponseBuilder rb{ctx, 3}; - rb.Push(RESULT_SUCCESS); + rb.Push(ResultSuccess); rb.Push(worker_buffer_sz); } @@ -286,7 +286,7 @@ void HwOpus::OpenOpusDecoder(Kernel::HLERequestContext& ctx) { } IPC::ResponseBuilder rb{ctx, 2, 0, 1}; - rb.Push(RESULT_SUCCESS); + rb.Push(ResultSuccess); rb.PushIpcInterface( system, OpusDecoderState{std::move(decoder), sample_rate, channel_count}); } -- cgit v1.2.3 From a0e4c2e1fc8d3ce33948a0ec6a840960f1ceb484 Mon Sep 17 00:00:00 2001 From: Morph <39850852+Morph1984@users.noreply.github.com> Date: Fri, 21 May 2021 01:06:31 -0400 Subject: general: Replace RESULT_UNKNOWN with ResultUnknown Transition to PascalCase for result names. --- src/core/file_sys/romfs_factory.cpp | 6 +++--- src/core/file_sys/savedata_factory.cpp | 4 ++-- src/core/hle/kernel/k_address_arbiter.h | 4 ++-- src/core/hle/result.h | 4 ++-- src/core/hle/service/acc/acc.cpp | 6 +++--- src/core/hle/service/am/am.cpp | 12 +++++------ src/core/hle/service/aoc/aoc_u.cpp | 2 +- src/core/hle/service/audio/hwopus.cpp | 4 ++-- src/core/hle/service/bcat/backend/boxcat.cpp | 2 +- src/core/hle/service/filesystem/filesystem.cpp | 30 +++++++++++++------------- src/core/hle/service/filesystem/fsp_srv.cpp | 8 +++---- src/core/hle/service/hid/hid.cpp | 4 ++-- src/core/hle/service/ns/ns.cpp | 4 ++-- 13 files changed, 45 insertions(+), 45 deletions(-) (limited to 'src/core/hle/service/audio') diff --git a/src/core/file_sys/romfs_factory.cpp b/src/core/file_sys/romfs_factory.cpp index aa7f3072f..638c6cea8 100644 --- a/src/core/file_sys/romfs_factory.cpp +++ b/src/core/file_sys/romfs_factory.cpp @@ -53,7 +53,7 @@ ResultVal RomFSFactory::OpenPatchedRomFS(u64 title_id, ContentRecor if (nca == nullptr) { // TODO: Find the right error code to use here - return RESULT_UNKNOWN; + return ResultUnknown; } const PatchManager patch_manager{title_id, filesystem_controller, content_provider}; @@ -74,13 +74,13 @@ ResultVal RomFSFactory::Open(u64 title_id, StorageId storage, const std::shared_ptr res = GetEntry(title_id, storage, type); if (res == nullptr) { // TODO(DarkLordZach): Find the right error code to use here - return RESULT_UNKNOWN; + return ResultUnknown; } const auto romfs = res->GetRomFS(); if (romfs == nullptr) { // TODO(DarkLordZach): Find the right error code to use here - return RESULT_UNKNOWN; + return ResultUnknown; } return MakeResult(romfs); diff --git a/src/core/file_sys/savedata_factory.cpp b/src/core/file_sys/savedata_factory.cpp index f973d1d21..6c3685927 100644 --- a/src/core/file_sys/savedata_factory.cpp +++ b/src/core/file_sys/savedata_factory.cpp @@ -91,7 +91,7 @@ ResultVal SaveDataFactory::Create(SaveDataSpaceId space, // Return an error if the save data doesn't actually exist. if (out == nullptr) { // TODO(DarkLordZach): Find out correct error code. - return RESULT_UNKNOWN; + return ResultUnknown; } return MakeResult(std::move(out)); @@ -112,7 +112,7 @@ ResultVal SaveDataFactory::Open(SaveDataSpaceId space, // Return an error if the save data doesn't actually exist. if (out == nullptr) { // TODO(Subv): Find out correct error code. - return RESULT_UNKNOWN; + return ResultUnknown; } return MakeResult(std::move(out)); diff --git a/src/core/hle/kernel/k_address_arbiter.h b/src/core/hle/kernel/k_address_arbiter.h index 8d379b524..bf8b46665 100644 --- a/src/core/hle/kernel/k_address_arbiter.h +++ b/src/core/hle/kernel/k_address_arbiter.h @@ -37,7 +37,7 @@ public: return SignalAndModifyByWaitingCountIfEqual(addr, value, count); } UNREACHABLE(); - return RESULT_UNKNOWN; + return ResultUnknown; } [[nodiscard]] ResultCode WaitForAddress(VAddr addr, Svc::ArbitrationType type, s32 value, @@ -51,7 +51,7 @@ public: return WaitIfEqual(addr, value, timeout); } UNREACHABLE(); - return RESULT_UNKNOWN; + return ResultUnknown; } private: diff --git a/src/core/hle/result.h b/src/core/hle/result.h index 9ec124cf4..605236552 100644 --- a/src/core/hle/result.h +++ b/src/core/hle/result.h @@ -152,7 +152,7 @@ constexpr ResultCode ResultSuccess(0); * @note This should only be used when a particular error code * is not known yet. */ -constexpr ResultCode RESULT_UNKNOWN(UINT32_MAX); +constexpr ResultCode ResultUnknown(UINT32_MAX); /** * This is an optional value type. It holds a `ResultCode` and, if that code is a success code, @@ -191,7 +191,7 @@ class ResultVal { public: /// Constructs an empty `ResultVal` with the given error code. The code must not be a success /// code. - ResultVal(ResultCode error_code = RESULT_UNKNOWN) : result_code(error_code) { + ResultVal(ResultCode error_code = ResultUnknown) : result_code(error_code) { ASSERT(error_code.IsError()); } diff --git a/src/core/hle/service/acc/acc.cpp b/src/core/hle/service/acc/acc.cpp index ecf815484..d1c1fb71d 100644 --- a/src/core/hle/service/acc/acc.cpp +++ b/src/core/hle/service/acc/acc.cpp @@ -304,7 +304,7 @@ protected: LOG_ERROR(Service_ACC, "Failed to get profile base and data for user={}", user_id.Format()); IPC::ResponseBuilder rb{ctx, 2}; - rb.Push(RESULT_UNKNOWN); // TODO(ogniK): Get actual error code + rb.Push(ResultUnknown); // TODO(ogniK): Get actual error code } } @@ -318,7 +318,7 @@ protected: } else { LOG_ERROR(Service_ACC, "Failed to get profile base for user={}", user_id.Format()); IPC::ResponseBuilder rb{ctx, 2}; - rb.Push(RESULT_UNKNOWN); // TODO(ogniK): Get actual error code + rb.Push(ResultUnknown); // TODO(ogniK): Get actual error code } } @@ -903,7 +903,7 @@ void Module::Interface::TrySelectUserWithoutInteraction(Kernel::HLERequestContex const auto user_list = profile_manager->GetAllUsers(); if (std::all_of(user_list.begin(), user_list.end(), [](const auto& user) { return user.uuid == Common::INVALID_UUID; })) { - rb.Push(RESULT_UNKNOWN); // TODO(ogniK): Find the correct error code + rb.Push(ResultUnknown); // TODO(ogniK): Find the correct error code rb.PushRaw(Common::INVALID_UUID); return; } diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index 3a44fdeaf..b578153d3 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp @@ -1162,7 +1162,7 @@ void ILibraryAppletCreator::CreateLibraryApplet(Kernel::HLERequestContext& ctx) LOG_ERROR(Service_AM, "Applet doesn't exist! applet_id={}", applet_id); IPC::ResponseBuilder rb{ctx, 2}; - rb.Push(RESULT_UNKNOWN); + rb.Push(ResultUnknown); return; } @@ -1182,7 +1182,7 @@ void ILibraryAppletCreator::CreateStorage(Kernel::HLERequestContext& ctx) { if (size <= 0) { LOG_ERROR(Service_AM, "size is less than or equal to 0"); IPC::ResponseBuilder rb{ctx, 2}; - rb.Push(RESULT_UNKNOWN); + rb.Push(ResultUnknown); return; } @@ -1210,7 +1210,7 @@ void ILibraryAppletCreator::CreateTransferMemoryStorage(Kernel::HLERequestContex if (parameters.size <= 0) { LOG_ERROR(Service_AM, "size is less than or equal to 0"); IPC::ResponseBuilder rb{ctx, 2}; - rb.Push(RESULT_UNKNOWN); + rb.Push(ResultUnknown); return; } @@ -1220,7 +1220,7 @@ void ILibraryAppletCreator::CreateTransferMemoryStorage(Kernel::HLERequestContex if (transfer_mem.IsNull()) { LOG_ERROR(Service_AM, "transfer_mem is a nullptr for handle={:08X}", handle); IPC::ResponseBuilder rb{ctx, 2}; - rb.Push(RESULT_UNKNOWN); + rb.Push(ResultUnknown); return; } @@ -1244,7 +1244,7 @@ void ILibraryAppletCreator::CreateHandleStorage(Kernel::HLERequestContext& ctx) if (size <= 0) { LOG_ERROR(Service_AM, "size is less than or equal to 0"); IPC::ResponseBuilder rb{ctx, 2}; - rb.Push(RESULT_UNKNOWN); + rb.Push(ResultUnknown); return; } @@ -1254,7 +1254,7 @@ void ILibraryAppletCreator::CreateHandleStorage(Kernel::HLERequestContext& ctx) if (transfer_mem.IsNull()) { LOG_ERROR(Service_AM, "transfer_mem is a nullptr for handle={:08X}", handle); IPC::ResponseBuilder rb{ctx, 2}; - rb.Push(RESULT_UNKNOWN); + rb.Push(ResultUnknown); return; } diff --git a/src/core/hle/service/aoc/aoc_u.cpp b/src/core/hle/service/aoc/aoc_u.cpp index 67787496a..fec704c65 100644 --- a/src/core/hle/service/aoc/aoc_u.cpp +++ b/src/core/hle/service/aoc/aoc_u.cpp @@ -190,7 +190,7 @@ void AOC_U::ListAddOnContent(Kernel::HLERequestContext& ctx) { if (out.size() < offset) { IPC::ResponseBuilder rb{ctx, 2}; // TODO(DarkLordZach): Find the correct error code. - rb.Push(RESULT_UNKNOWN); + rb.Push(ResultUnknown); return; } diff --git a/src/core/hle/service/audio/hwopus.cpp b/src/core/hle/service/audio/hwopus.cpp index 4e534edac..10e6f7a64 100644 --- a/src/core/hle/service/audio/hwopus.cpp +++ b/src/core/hle/service/audio/hwopus.cpp @@ -80,7 +80,7 @@ private: LOG_ERROR(Audio, "Failed to decode opus data"); IPC::ResponseBuilder rb{ctx, 2}; // TODO(ogniK): Use correct error code - rb.Push(RESULT_UNKNOWN); + rb.Push(ResultUnknown); return; } @@ -281,7 +281,7 @@ void HwOpus::OpenOpusDecoder(Kernel::HLERequestContext& ctx) { LOG_ERROR(Audio, "Failed to create Opus decoder (error={}).", error); IPC::ResponseBuilder rb{ctx, 2}; // TODO(ogniK): Use correct error code - rb.Push(RESULT_UNKNOWN); + rb.Push(ResultUnknown); return; } diff --git a/src/core/hle/service/bcat/backend/boxcat.cpp b/src/core/hle/service/bcat/backend/boxcat.cpp index 24bc3a670..d9fdc2dca 100644 --- a/src/core/hle/service/bcat/backend/boxcat.cpp +++ b/src/core/hle/service/bcat/backend/boxcat.cpp @@ -121,7 +121,7 @@ void HandleDownloadDisplayResult(const AM::Applets::AppletManager& applet_manage const auto& frontend{applet_manager.GetAppletFrontendSet()}; frontend.error->ShowCustomErrorText( - RESULT_UNKNOWN, "There was an error while attempting to use Boxcat.", + ResultUnknown, "There was an error while attempting to use Boxcat.", DOWNLOAD_RESULT_LOG_MESSAGES[static_cast(res)], [] {}); } diff --git a/src/core/hle/service/filesystem/filesystem.cpp b/src/core/hle/service/filesystem/filesystem.cpp index 84d1717ab..4a1908bcb 100644 --- a/src/core/hle/service/filesystem/filesystem.cpp +++ b/src/core/hle/service/filesystem/filesystem.cpp @@ -67,11 +67,11 @@ ResultCode VfsDirectoryServiceWrapper::CreateFile(const std::string& path_, u64 auto file = dir->CreateFile(Common::FS::GetFilename(path)); if (file == nullptr) { // TODO(DarkLordZach): Find a better error code for this - return RESULT_UNKNOWN; + return ResultUnknown; } if (!file->Resize(size)) { // TODO(DarkLordZach): Find a better error code for this - return RESULT_UNKNOWN; + return ResultUnknown; } return ResultSuccess; } @@ -89,7 +89,7 @@ ResultCode VfsDirectoryServiceWrapper::DeleteFile(const std::string& path_) cons } if (!dir->DeleteFile(Common::FS::GetFilename(path))) { // TODO(DarkLordZach): Find a better error code for this - return RESULT_UNKNOWN; + return ResultUnknown; } return ResultSuccess; @@ -104,7 +104,7 @@ ResultCode VfsDirectoryServiceWrapper::CreateDirectory(const std::string& path_) auto new_dir = dir->CreateSubdirectory(Common::FS::GetFilename(path)); if (new_dir == nullptr) { // TODO(DarkLordZach): Find a better error code for this - return RESULT_UNKNOWN; + return ResultUnknown; } return ResultSuccess; } @@ -114,7 +114,7 @@ ResultCode VfsDirectoryServiceWrapper::DeleteDirectory(const std::string& path_) auto dir = GetDirectoryRelativeWrapped(backing, Common::FS::GetParentPath(path)); if (!dir->DeleteSubdirectory(Common::FS::GetFilename(path))) { // TODO(DarkLordZach): Find a better error code for this - return RESULT_UNKNOWN; + return ResultUnknown; } return ResultSuccess; } @@ -124,7 +124,7 @@ ResultCode VfsDirectoryServiceWrapper::DeleteDirectoryRecursively(const std::str auto dir = GetDirectoryRelativeWrapped(backing, Common::FS::GetParentPath(path)); if (!dir->DeleteSubdirectoryRecursive(Common::FS::GetFilename(path))) { // TODO(DarkLordZach): Find a better error code for this - return RESULT_UNKNOWN; + return ResultUnknown; } return ResultSuccess; } @@ -135,7 +135,7 @@ ResultCode VfsDirectoryServiceWrapper::CleanDirectoryRecursively(const std::stri if (!dir->CleanSubdirectoryRecursive(Common::FS::GetFilename(sanitized_path))) { // TODO(DarkLordZach): Find a better error code for this - return RESULT_UNKNOWN; + return ResultUnknown; } return ResultSuccess; @@ -152,7 +152,7 @@ ResultCode VfsDirectoryServiceWrapper::RenameFile(const std::string& src_path_, return FileSys::ERROR_PATH_NOT_FOUND; if (!src->Rename(Common::FS::GetFilename(dest_path))) { // TODO(DarkLordZach): Find a better error code for this - return RESULT_UNKNOWN; + return ResultUnknown; } return ResultSuccess; } @@ -170,7 +170,7 @@ ResultCode VfsDirectoryServiceWrapper::RenameFile(const std::string& src_path_, if (!src->GetContainingDirectory()->DeleteFile(Common::FS::GetFilename(src_path))) { // TODO(DarkLordZach): Find a better error code for this - return RESULT_UNKNOWN; + return ResultUnknown; } return ResultSuccess; @@ -187,7 +187,7 @@ ResultCode VfsDirectoryServiceWrapper::RenameDirectory(const std::string& src_pa return FileSys::ERROR_PATH_NOT_FOUND; if (!src->Rename(Common::FS::GetFilename(dest_path))) { // TODO(DarkLordZach): Find a better error code for this - return RESULT_UNKNOWN; + return ResultUnknown; } return ResultSuccess; } @@ -199,7 +199,7 @@ ResultCode VfsDirectoryServiceWrapper::RenameDirectory(const std::string& src_pa src_path, dest_path); // TODO(DarkLordZach): Find a better error code for this - return RESULT_UNKNOWN; + return ResultUnknown; } ResultVal VfsDirectoryServiceWrapper::OpenFile(const std::string& path_, @@ -297,7 +297,7 @@ ResultVal FileSystemController::OpenRomFSCurrentProcess() if (romfs_factory == nullptr) { // TODO(bunnei): Find a better error code for this - return RESULT_UNKNOWN; + return ResultUnknown; } return romfs_factory->OpenCurrentProcess(system.CurrentProcess()->GetTitleID()); @@ -309,7 +309,7 @@ ResultVal FileSystemController::OpenPatchedRomFS( if (romfs_factory == nullptr) { // TODO: Find a better error code for this - return RESULT_UNKNOWN; + return ResultUnknown; } return romfs_factory->OpenPatchedRomFS(title_id, type); @@ -322,7 +322,7 @@ ResultVal FileSystemController::OpenPatchedRomFSWithProgra if (romfs_factory == nullptr) { // TODO: Find a better error code for this - return RESULT_UNKNOWN; + return ResultUnknown; } return romfs_factory->OpenPatchedRomFSWithProgramIndex(title_id, program_index, type); @@ -335,7 +335,7 @@ ResultVal FileSystemController::OpenRomFS( if (romfs_factory == nullptr) { // TODO(bunnei): Find a better error code for this - return RESULT_UNKNOWN; + return ResultUnknown; } return romfs_factory->Open(title_id, storage_id, type); diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp index 37bcec5a1..d9e8020b4 100644 --- a/src/core/hle/service/filesystem/fsp_srv.cpp +++ b/src/core/hle/service/filesystem/fsp_srv.cpp @@ -807,7 +807,7 @@ void FSP_SRV::OpenFileSystemWithPatch(Kernel::HLERequestContext& ctx) { LOG_WARNING(Service_FS, "(STUBBED) called with type={}, title_id={:016X}", type, title_id); IPC::ResponseBuilder rb{ctx, 2, 0, 0}; - rb.Push(RESULT_UNKNOWN); + rb.Push(ResultUnknown); } void FSP_SRV::OpenSdCardFileSystem(Kernel::HLERequestContext& ctx) { @@ -941,7 +941,7 @@ void FSP_SRV::OpenDataStorageByCurrentProcess(Kernel::HLERequestContext& ctx) { // TODO (bunnei): Find the right error code to use here LOG_CRITICAL(Service_FS, "no file system interface available!"); IPC::ResponseBuilder rb{ctx, 2}; - rb.Push(RESULT_UNKNOWN); + rb.Push(ResultUnknown); return; } @@ -978,7 +978,7 @@ void FSP_SRV::OpenDataStorageByDataId(Kernel::HLERequestContext& ctx) { "could not open data storage with title_id={:016X}, storage_id={:02X}", title_id, storage_id); IPC::ResponseBuilder rb{ctx, 2}; - rb.Push(RESULT_UNKNOWN); + rb.Push(ResultUnknown); return; } @@ -1019,7 +1019,7 @@ void FSP_SRV::OpenDataStorageWithProgramIndex(Kernel::HLERequestContext& ctx) { LOG_ERROR(Service_FS, "could not open storage with program_index={}", program_index); IPC::ResponseBuilder rb{ctx, 2}; - rb.Push(RESULT_UNKNOWN); + rb.Push(ResultUnknown); return; } diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp index 195284727..fa6213d3c 100644 --- a/src/core/hle/service/hid/hid.cpp +++ b/src/core/hle/service/hid/hid.cpp @@ -1500,7 +1500,7 @@ void Hid::InitializeSevenSixAxisSensor(Kernel::HLERequestContext& ctx) { if (t_mem_1.IsNull()) { LOG_ERROR(Service_HID, "t_mem_1 is a nullptr for handle=0x{:08X}", t_mem_1_handle); IPC::ResponseBuilder rb{ctx, 2}; - rb.Push(RESULT_UNKNOWN); + rb.Push(ResultUnknown); return; } @@ -1510,7 +1510,7 @@ void Hid::InitializeSevenSixAxisSensor(Kernel::HLERequestContext& ctx) { if (t_mem_2.IsNull()) { LOG_ERROR(Service_HID, "t_mem_2 is a nullptr for handle=0x{:08X}", t_mem_2_handle); IPC::ResponseBuilder rb{ctx, 2}; - rb.Push(RESULT_UNKNOWN); + rb.Push(ResultUnknown); return; } diff --git a/src/core/hle/service/ns/ns.cpp b/src/core/hle/service/ns/ns.cpp index 9f5fbfc0f..8ce1f3296 100644 --- a/src/core/hle/service/ns/ns.cpp +++ b/src/core/hle/service/ns/ns.cpp @@ -335,7 +335,7 @@ void IApplicationManagerInterface::GetApplicationControlData(Kernel::HLERequestC "output buffer is too small! (actual={:016X}, expected_min=0x4000)", size); IPC::ResponseBuilder rb{ctx, 2}; // TODO(DarkLordZach): Find a better error code for this. - rb.Push(RESULT_UNKNOWN); + rb.Push(ResultUnknown); return; } @@ -355,7 +355,7 @@ void IApplicationManagerInterface::GetApplicationControlData(Kernel::HLERequestC 0x4000 + control.second->GetSize()); IPC::ResponseBuilder rb{ctx, 2}; // TODO(DarkLordZach): Find a better error code for this. - rb.Push(RESULT_UNKNOWN); + rb.Push(ResultUnknown); return; } -- cgit v1.2.3