diff --git a/Common/GPU/Vulkan/VulkanRenderManager.cpp b/Common/GPU/Vulkan/VulkanRenderManager.cpp index c2dcdc09dc..81b5860801 100644 --- a/Common/GPU/Vulkan/VulkanRenderManager.cpp +++ b/Common/GPU/Vulkan/VulkanRenderManager.cpp @@ -1116,21 +1116,6 @@ VkCommandBuffer VulkanRenderManager::GetInitCmd() { return frameData_[curFrame].GetInitCmd(vulkan_); } -void VulkanRenderManager::ReportBadStateForDraw() { - const char *cause1 = ""; - char cause2[256]; - cause2[0] = '\0'; - if (!curRenderStep_) { - cause1 = "No current render step"; - } - if (curRenderStep_ && curRenderStep_->stepType != VKRStepType::RENDER) { - cause1 = "Not a render step: "; - std::string str = VulkanQueueRunner::StepToString(vulkan_, *curRenderStep_); - truncate_cpy(cause2, str); - } - ERROR_LOG_REPORT_ONCE(baddraw, Log::G3D, "Can't draw: %s%s. Step count: %d", cause1, cause2, (int)steps_.size()); -} - bool VulkanRenderManager::PipelinesPending() { // Pipelines still in the queue, or taken off it but not yet made into tasks, aren't in flight yet. std::unique_lock lock(compileQueueMutex_); diff --git a/Common/GPU/Vulkan/VulkanRenderManager.h b/Common/GPU/Vulkan/VulkanRenderManager.h index ea983c6f8c..d0550f7b6a 100644 --- a/Common/GPU/Vulkan/VulkanRenderManager.h +++ b/Common/GPU/Vulkan/VulkanRenderManager.h @@ -290,8 +290,6 @@ public: VKRPipelineLayout *CreatePipelineLayout(BindingType *bindingTypes, size_t bindingCount, const char *tag); void DestroyPipelineLayout(VKRPipelineLayout *pipelineLayout); - void ReportBadStateForDraw(); - // True while there are queued or compiling pipelines. bool PipelinesPending(); diff --git a/Common/UI/PopupScreens.cpp b/Common/UI/PopupScreens.cpp index 4a27d80fe0..4db4ab4114 100644 --- a/Common/UI/PopupScreens.cpp +++ b/Common/UI/PopupScreens.cpp @@ -240,7 +240,7 @@ void PopupScreen::CreateViews() { box_->SetRoundCorners(RoundCorners::All); // Rounds the top of the header and the bottom of the last view, to match the box. - box_->ApplyRoundCorners(RoundCorners::All); + box_->SetRoundCorners(RoundCorners::All); } void MessagePopupScreen::CreatePopupContents(UI::ViewGroup *parent) { @@ -692,7 +692,7 @@ void SliderPopupScreen::CreatePopupContents(UI::ViewGroup *parent) { if (!negativeLabel_.empty()) vert->Add(new CheckBox(&disabled_, negativeLabel_)); - lin->ApplyRoundCorners(); + lin->SetRoundCorners(); if (IsFocusMovementEnabled()) UI::SetFocusedView(slider_, FocusFlags::CAUSE_SCREEN_CHANGE); @@ -738,7 +738,7 @@ void SliderFloatPopupScreen::CreatePopupContents(UI::ViewGroup *parent) { }); reset->SetRoundCorners(); } - lin->ApplyRoundCorners(); + lin->SetRoundCorners(); // slider_ = parent->Add(new SliderFloat(&sliderValue_, minValue_, maxValue_, new LinearLayoutParams(UI::Margins(10, 5)))); if (IsFocusMovementEnabled()) diff --git a/Common/UI/ScrollView.cpp b/Common/UI/ScrollView.cpp index e391b38a74..f6c57dfd42 100644 --- a/Common/UI/ScrollView.cpp +++ b/Common/UI/ScrollView.cpp @@ -674,7 +674,7 @@ void ListView::CreateAllItems() { OnItemCallback(i, e); }); } - linLayout_->ApplyRoundCorners(); + linLayout_->SetRoundCorners(); } void ListView::Measure(const UIContext &dc, MeasureSpec horiz, MeasureSpec vert) { diff --git a/Common/UI/TabHolder.cpp b/Common/UI/TabHolder.cpp index 96a536224c..e540f08f2b 100644 --- a/Common/UI/TabHolder.cpp +++ b/Common/UI/TabHolder.cpp @@ -86,7 +86,7 @@ void TabHolder::AddTabContents(std::string_view title, ImageID imageId, ViewGrou } else { tabStrip_->AddChoice(title); } - tabStrip_->ApplyRoundCorners(orientation_ == Orientation::ORIENT_HORIZONTAL ? RoundCorners::Left : RoundCorners::Top); + tabStrip_->SetRoundCorners(orientation_ == Orientation::ORIENT_HORIZONTAL ? RoundCorners::Left : RoundCorners::Top); contents_->Add(tabContents); if (tabs_.size() > 1) @@ -108,7 +108,7 @@ void TabHolder::AddTabDeferred(std::string_view title, ImageID imageId, std::fun } else { tabStrip_->AddChoice(title); } - tabStrip_->ApplyRoundCorners(orientation_ == Orientation::ORIENT_HORIZONTAL ? RoundCorners::Left : RoundCorners::Top); + tabStrip_->SetRoundCorners(orientation_ == Orientation::ORIENT_HORIZONTAL ? RoundCorners::Left : RoundCorners::Top); tabTweens_.push_back(nullptr); createFuncs_.push_back(createCb); diff --git a/Common/UI/View.cpp b/Common/UI/View.cpp index 2942c7f7f0..31535a9713 100644 --- a/Common/UI/View.cpp +++ b/Common/UI/View.cpp @@ -628,6 +628,19 @@ InfoItem::InfoItem(std::string_view text, int rightValue, LayoutParams *layoutPa void InfoItem::GetContentDimensionsBySpec(const UIContext &dc, MeasureSpec horiz, MeasureSpec vert, float &w, float &h) const { float w1, h1, w2, h2; + + if (rightText_.empty()) { + // There's only one text, and that should wrap. + if (horiz.type == MeasureSpecType::AT_MOST) { + float availableWidth = horiz.size - 24; + dc.MeasureTextRect(dc.GetTheme().uiFont, 1.0f, 1.0f, text_, availableWidth, &w, &h, FLAG_WRAP_TEXT); + } else { + dc.MeasureText(dc.GetTheme().uiFont, 1.0f, 1.0f, text_, &w, &h, 0); + } + h += 24; + return; + } + dc.MeasureText(dc.GetTheme().uiFont, 1.0f, 1.0f, text_, &w1, &h1, 0); if (horiz.type == MeasureSpecType::AT_MOST) { @@ -654,6 +667,13 @@ void InfoItem::Draw(UIContext &dc) { dc.FillRoundRect(style.background, bounds_, dc.GetTheme().choiceRoundRadius, roundCorners_); + if (rightText_.empty()) { + int paddingX = 12; + Bounds padBounds = bounds_.Expand(-paddingX, 0); + dc.DrawTextRect(text_, padBounds, style.fgColor, ALIGN_VCENTER | FLAG_WRAP_TEXT); + return; + } + int paddingX = 12; Bounds padBounds = bounds_.Expand(-paddingX, 0); diff --git a/Common/UI/View.h b/Common/UI/View.h index 63f1e1f488..6f5a8cbfdd 100644 --- a/Common/UI/View.h +++ b/Common/UI/View.h @@ -878,6 +878,7 @@ protected: class InfoItem : public Item { public: + // If you pass an empty string for rightText, it will be left blank. InfoItem(std::string_view text, std::string_view rightText, LayoutParams *layoutParams = nullptr); InfoItem(std::string_view text, int rightValue, LayoutParams *layoutParams = nullptr); diff --git a/Common/UI/ViewGroup.cpp b/Common/UI/ViewGroup.cpp index 502e167b06..b9ac9046ea 100644 --- a/Common/UI/ViewGroup.cpp +++ b/Common/UI/ViewGroup.cpp @@ -852,7 +852,7 @@ void LinearLayout::Layout() { // Applies rounding to the corners of the child views, based on their position in the layout and the orientation. Masked by the outerCorners. // Ignores invisible views. -void LinearLayout::ApplyRoundCorners(RoundCorners outerCorners) { +void LinearLayout::SetRoundCorners(RoundCorners outerCorners) { // Easy case first: There's spacing, just apply round corners to all subviews. if (spacing_ > 0.0f) { for (View *view : views_) { @@ -916,7 +916,7 @@ void ChoiceGroup::Draw(UIContext &dc) { // Maybe we should require the user to Finish() the ChoiceGroup instead of running this every frame. // At least it's not recursive. - ApplyRoundCorners(RoundCorners::All); + SetRoundCorners(RoundCorners::All); // Draw a roundrect as background. LinearLayout::Draw(dc); diff --git a/Common/UI/ViewGroup.h b/Common/UI/ViewGroup.h index f71c4331b3..717077762a 100644 --- a/Common/UI/ViewGroup.h +++ b/Common/UI/ViewGroup.h @@ -232,9 +232,9 @@ public: contentGravity_ = gravity; } - // Applies rounding to the corners of the child views, based on their position in the layout and the orientation. Masked by the outerCorners. + // Override, applies rounding to the corners of the child views, based on their position in the layout and the orientation. Masked by the outerCorners. // Note that if the view's spacing is not 0.0f, all views will get the rounded corners since they will appear separate. - void ApplyRoundCorners(RoundCorners outerCorners = RoundCorners::All); + void SetRoundCorners(RoundCorners outerCorners = RoundCorners::All) override; std::string DescribeLog() const override { return (orientation_ == ORIENT_HORIZONTAL ? "LinearLayoutHoriz: " : "LinearLayoutVert: ") + View::DescribeLog(); } diff --git a/Core/Dialog/PSPSaveDialog.cpp b/Core/Dialog/PSPSaveDialog.cpp index d68d2b4f72..9f21fdb752 100755 --- a/Core/Dialog/PSPSaveDialog.cpp +++ b/Core/Dialog/PSPSaveDialog.cpp @@ -1261,7 +1261,6 @@ void PSPSaveDialog::StartIOThread() { ioThreadStatus = SAVEIO_PENDING; ioThread = std::thread([this]() { SetCurrentThreadName("SaveIO"); - AndroidJNIThreadContext jniContext; this->ExecuteIOAction(); }); diff --git a/Core/Dialog/SavedataParam.cpp b/Core/Dialog/SavedataParam.cpp index 39d31acabb..3d35c3436a 100644 --- a/Core/Dialog/SavedataParam.cpp +++ b/Core/Dialog/SavedataParam.cpp @@ -687,7 +687,7 @@ int SavedataParam::LoadSaveData(SceUtilitySavedataParam *param, const std::strin ERROR_LOG_REPORT(Log::sceUtility, "Savedata version with missing key: %d", param->secureVersion); return SCE_UTILITY_SAVEDATA_ERROR_LOAD_PARAM; } else if (param->secureVersion != 0) { - WARN_LOG_REPORT(Log::sceUtility, "Savedata version requested: %d", param->secureVersion); + INFO_LOG(Log::sceUtility, "Savedata version requested: %d", param->secureVersion); } std::string filename = GetFileName(param); diff --git a/Core/HLE/sceIo.cpp b/Core/HLE/sceIo.cpp index e22e35167a..36474dc498 100644 --- a/Core/HLE/sceIo.cpp +++ b/Core/HLE/sceIo.cpp @@ -843,7 +843,7 @@ static u32 sceIoAssign(u32 alias_addr, u32 physical_addr, u32 filesystem_addr, i perm = "unhandled"; break; } - WARN_LOG_REPORT(Log::sceIo, "sceIoAssign(%s, %s, %s, %s, %08x, %i)", alias.c_str(), physical_dev.c_str(), filesystem_dev.c_str(), perm.c_str(), arg_addr, argSize); + INFO_LOG(Log::sceIo, "sceIoAssign(%s, %s, %s, %s, %08x, %i)", alias.c_str(), physical_dev.c_str(), filesystem_dev.c_str(), perm.c_str(), arg_addr, argSize); return 0; } diff --git a/Core/HLE/sceKernelModule.cpp b/Core/HLE/sceKernelModule.cpp index a4028a092a..6b084b1808 100644 --- a/Core/HLE/sceKernelModule.cpp +++ b/Core/HLE/sceKernelModule.cpp @@ -3055,7 +3055,7 @@ u32 sceKernelLoadModule(MIPSState *mips, const char *name, u32 flags, u32 option ERROR_LOG_REPORT(Log::Loader, "sceKernelLoadModule(%s): invalid position (fixed)", name); return hleDelayResult(SCE_KERNEL_ERROR_MEMBLOCK_ALLOC_FAILED, "module loaded", 500); } - WARN_LOG_REPORT(Log::Loader, "sceKernelLoadModule: unsupported options size=%08x, flags=%08x, pos=%d, access=%d, data=%d, text=%d", lmoption->size, lmoption->flags, lmoption->position, lmoption->access, lmoption->mpiddata, lmoption->mpidtext); + WARN_LOG(Log::Loader, "sceKernelLoadModule: unsupported options size=%08x, flags=%08x, pos=%d, access=%d, data=%d, text=%d", lmoption->size, lmoption->flags, lmoption->position, lmoption->access, lmoption->mpiddata, lmoption->mpidtext); } // Opening and reading the file, then about 1ms plus 30us per KB of loader work, the caller waiting @@ -3455,7 +3455,7 @@ u32 __KernelStopUnloadSelfModuleWithOrWithoutStatus(u32 exitCode, u32 argSize, u if (loadedModules.size() > 1) { if (WithStatus) { - ERROR_LOG_REPORT(Log::sceModule, "UNIMPL sceKernelStopUnloadSelfModuleWithStatus(%08x, %08x, %08x, %08x, %08x): game may have crashed", exitCode, argSize, argp, statusAddr, optionAddr); + WARN_LOG(Log::sceModule, "sceKernelStopUnloadSelfModuleWithStatus(%08x, %08x, %08x, %08x, %08x)", exitCode, argSize, argp, statusAddr, optionAddr); } else { // NOTE: The previous "may have crashed" message is not accurate, Splinter Cell Essentials uses this normally when leaving/entering in-game. // We should not report this. @@ -3749,7 +3749,7 @@ static u32 sceKernelLoadModuleByID(u32 id, u32 flags, u32 lmoptionPtr) { const SceKernelLMOption *lmoption = 0; if (lmoptionPtr) { lmoption = (const SceKernelLMOption *)Memory::GetPointerOrException(lmoptionPtr); - WARN_LOG_REPORT(Log::Loader, "sceKernelLoadModuleByID: unsupported options size=%08x, flags=%08x, pos=%d, access=%d, data=%d, text=%d", lmoption->size, lmoption->flags, lmoption->position, lmoption->access, lmoption->mpiddata, lmoption->mpidtext); + WARN_LOG(Log::Loader, "sceKernelLoadModuleByID: unsupported options size=%08x, flags=%08x, pos=%d, access=%d, data=%d, text=%d", lmoption->size, lmoption->flags, lmoption->position, lmoption->access, lmoption->mpiddata, lmoption->mpidtext); } u32 pos = (u32)pspFileSystem.SeekFile(handle, 0, FILEMOVE_CURRENT); size_t size = pspFileSystem.SeekFile(handle, 0, FILEMOVE_END); @@ -3866,7 +3866,7 @@ SceUID sceKernelLoadModuleBufferUsbWlan(u32 size, u32 bufPtr, u32 flags, u32 lmo const SceKernelLMOption *lmoption = 0; if (lmoptionPtr) { lmoption = (const SceKernelLMOption *)Memory::GetPointerOrException(lmoptionPtr); - WARN_LOG_REPORT(Log::Loader, "sceKernelLoadModuleBufferUsbWlan: unsupported options size=%08x, flags=%08x, pos=%d, access=%d, data=%d, text=%d", lmoption->size, lmoption->flags, lmoption->position, lmoption->access, lmoption->mpiddata, lmoption->mpidtext); + WARN_LOG(Log::Loader, "sceKernelLoadModuleBufferUsbWlan: unsupported options size=%08x, flags=%08x, pos=%d, access=%d, data=%d, text=%d", lmoption->size, lmoption->flags, lmoption->position, lmoption->access, lmoption->mpiddata, lmoption->mpidtext); } std::string error_string; PSPModule *module = nullptr; diff --git a/Core/HLE/sceKernelThread.cpp b/Core/HLE/sceKernelThread.cpp index 49f5c6ff65..423df9e2c5 100644 --- a/Core/HLE/sceKernelThread.cpp +++ b/Core/HLE/sceKernelThread.cpp @@ -1703,7 +1703,7 @@ void __KernelStopThread(SceUID threadID, int exitStatus, const char *reason) t->nt.waitType = WAITTYPE_NONE; t->nt.waitID = 0; } else { - ERROR_LOG_REPORT(Log::sceKernel, "__KernelStopThread: thread %d does not exist (%s)", threadID, reason ? reason : "?"); + ERROR_LOG(Log::sceKernel, "__KernelStopThread: thread %d does not exist (%s)", threadID, reason ? reason : "?"); } } @@ -2175,7 +2175,7 @@ int __KernelCreateThread(const char *threadName, SceUID moduleID, u32 entry, u32 } if ((attr & ~PSP_THREAD_ATTR_SUPPORTED) != 0) { - WARN_LOG_REPORT(Log::sceKernel, "sceKernelCreateThread(name=%s): unsupported attributes %08x, ignoring", threadName, attr & ~PSP_THREAD_ATTR_SUPPORTED); + WARN_LOG(Log::sceKernel, "sceKernelCreateThread(name=%s): unsupported attributes %08x, ignoring", threadName, attr & ~PSP_THREAD_ATTR_SUPPORTED); } // TODO: Not sure what these values are, but they are removed from the attr silently. diff --git a/Core/HLE/sceNetAdhocMatching.cpp b/Core/HLE/sceNetAdhocMatching.cpp index 94cc80c454..a0d4b46c90 100644 --- a/Core/HLE/sceNetAdhocMatching.cpp +++ b/Core/HLE/sceNetAdhocMatching.cpp @@ -1525,7 +1525,7 @@ int sceNetAdhocMatchingDelete(MIPSState *mips, int matchingId) { } int sceNetAdhocMatchingInit(MIPSState *mips, u32 memsize) { - WARN_LOG_REPORT_ONCE(sceNetAdhocMatchingInit, Log::sceNet, "sceNetAdhocMatchingInit(%d) at %08x", memsize, mips->pc); + INFO_LOG(Log::sceNet, "sceNetAdhocMatchingInit(%d) at %08x", memsize, mips->pc); // Uninitialized Library if (netAdhocMatchingInited) diff --git a/Core/HLE/sceSas.cpp b/Core/HLE/sceSas.cpp index bf7d901847..0d48a5e118 100644 --- a/Core/HLE/sceSas.cpp +++ b/Core/HLE/sceSas.cpp @@ -225,23 +225,23 @@ void __SasShutdown() { static u32 sceSasInit(u32 core, u32 grainSize, u32 maxVoices, u32 outputMode, u32 sampleRate) { if (!Memory::IsValidAddress(core) || (core & 0x3F) != 0) { - ERROR_LOG_REPORT(Log::sceSas, "sceSasInit(%08x, %i, %i, %i, %i): bad core address", core, grainSize, maxVoices, outputMode, sampleRate); + ERROR_LOG(Log::sceSas, "sceSasInit(%08x, %i, %i, %i, %i): bad core address", core, grainSize, maxVoices, outputMode, sampleRate); return hleNoLog(SCE_SAS_ERROR_BAD_ADDRESS); } if (maxVoices == 0 || maxVoices > PSP_SAS_VOICES_MAX) { - ERROR_LOG_REPORT(Log::sceSas, "sceSasInit(%08x, %i, %i, %i, %i): bad max voices", core, grainSize, maxVoices, outputMode, sampleRate); + ERROR_LOG(Log::sceSas, "sceSasInit(%08x, %i, %i, %i, %i): bad max voices", core, grainSize, maxVoices, outputMode, sampleRate); return hleNoLog(SCE_SAS_ERROR_INVALID_MAX_VOICES); } if (grainSize < 0x40 || grainSize > 0x800 || (grainSize & 0x1F) != 0) { - ERROR_LOG_REPORT(Log::sceSas, "sceSasInit(%08x, %i, %i, %i, %i): bad grain size", core, grainSize, maxVoices, outputMode, sampleRate); + ERROR_LOG(Log::sceSas, "sceSasInit(%08x, %i, %i, %i, %i): bad grain size", core, grainSize, maxVoices, outputMode, sampleRate); return hleNoLog(SCE_SAS_ERROR_INVALID_GRAIN); } if (outputMode != 0 && outputMode != 1) { - ERROR_LOG_REPORT(Log::sceSas, "sceSasInit(%08x, %i, %i, %i, %i): bad output mode", core, grainSize, maxVoices, outputMode, sampleRate); + ERROR_LOG(Log::sceSas, "sceSasInit(%08x, %i, %i, %i, %i): bad output mode", core, grainSize, maxVoices, outputMode, sampleRate); return hleNoLog(SCE_SAS_ERROR_INVALID_OUTPUT_MODE); } if (sampleRate != 44100) { - ERROR_LOG_REPORT(Log::sceSas, "sceSasInit(%08x, %i, %i, %i, %i): bad sample rate", core, grainSize, maxVoices, outputMode, sampleRate); + ERROR_LOG(Log::sceSas, "sceSasInit(%08x, %i, %i, %i, %i): bad sample rate", core, grainSize, maxVoices, outputMode, sampleRate); return hleNoLog(SCE_SAS_ERROR_INVALID_SAMPLE_RATE); } @@ -292,7 +292,7 @@ static u32 _sceSasCore(u32 core, u32 outAddr) { PROFILE_THIS_SCOPE("mixer"); if (!Memory::IsValidAddress(outAddr)) { - return hleReportError(Log::sceSas, SCE_SAS_ERROR_INVALID_PARAMETER, "invalid address"); + return hleLogError(Log::sceSas, SCE_SAS_ERROR_INVALID_PARAMETER, "invalid address"); } if (!__KernelIsDispatchEnabled()) { return hleLogError(Log::sceSas, SCE_KERNEL_ERROR_CAN_NOT_WAIT, "dispatch disabled"); @@ -308,10 +308,10 @@ static u32 _sceSasCoreWithMix(u32 core, u32 inoutAddr, int leftVolume, int right PROFILE_THIS_SCOPE("mixer"); if (!Memory::IsValidAddress(inoutAddr)) { - return hleReportError(Log::sceSas, SCE_SAS_ERROR_INVALID_PARAMETER, "invalid address"); + return hleLogError(Log::sceSas, SCE_SAS_ERROR_INVALID_PARAMETER, "invalid address"); } if (sas->outputMode == PSP_SAS_OUTPUTMODE_RAW) { - return hleReportError(Log::sceSas, SCE_KERNEL_ERROR_BAD_ARGUMENT, "unsupported outputMode"); + return hleLogError(Log::sceSas, SCE_KERNEL_ERROR_BAD_ARGUMENT, "unsupported outputMode"); } if (!__KernelIsDispatchEnabled()) { return hleLogError(Log::sceSas, SCE_KERNEL_ERROR_CAN_NOT_WAIT, "dispatch disabled"); @@ -571,7 +571,7 @@ static u32 sceSasSetADSRMode(u32 core, int voiceNum, int flag, int a, int d, int // Some games do this right at init. It seems to fail even on a PSP, but let's not report it. return hleLogDebug(Log::sceSas, SCE_SAS_ERROR_INVALID_ADSR_CURVE_MODE, "sceSasSetADSRMode(%08x, %i, %i, %08x, %08x, %08x, %08x): invalid modes", core, voiceNum, flag, a, d, s, r); } else { - WARN_LOG_REPORT(Log::sceSas, "sceSasSetADSRMode(%08x, %i, %i, %08x, %08x, %08x, %08x): invalid modes", core, voiceNum, flag, a, d, s, r); + WARN_LOG(Log::sceSas, "sceSasSetADSRMode(%08x, %i, %i, %08x, %08x, %08x, %08x): invalid modes", core, voiceNum, flag, a, d, s, r); return hleNoLog(SCE_SAS_ERROR_INVALID_ADSR_CURVE_MODE); } } @@ -660,7 +660,7 @@ static u32 sceSasSetGrain(u32 core, int grain) { // allocated value beyond PSP_SAS_MAX_GRAIN) read out of bounds of the fixed-size // mixTemp_ buffer during mixing. Apply the same bounds sceSasInit uses. if (grain < 0x40 || grain > 0x800 || (grain & 0x1F) != 0) { - ERROR_LOG_REPORT(Log::sceSas, "sceSasSetGrain(%08x, %i): bad grain size", core, grain); + ERROR_LOG(Log::sceSas, "sceSasSetGrain(%08x, %i): bad grain size", core, grain); return hleNoLog(SCE_SAS_ERROR_INVALID_GRAIN); } __SasDrain(); @@ -674,7 +674,7 @@ static u32 sceSasGetOutputMode(u32 core) { static u32 sceSasSetOutputMode(u32 core, u32 outputMode) { if (outputMode != 0 && outputMode != 1) { - ERROR_LOG_REPORT(Log::sceSas, "sceSasSetOutputMode(%08x, %i): bad output mode", core, outputMode); + ERROR_LOG(Log::sceSas, "sceSasSetOutputMode(%08x, %i): bad output mode", core, outputMode); return hleNoLog(SCE_SAS_ERROR_INVALID_OUTPUT_MODE); } diff --git a/Core/HLE/sceUtility.cpp b/Core/HLE/sceUtility.cpp index 52b3c2fe9f..9ee6ff6d14 100644 --- a/Core/HLE/sceUtility.cpp +++ b/Core/HLE/sceUtility.cpp @@ -1413,7 +1413,7 @@ static int sceUtilityGetNetParamLatestID(u32 idAddr) { //TODO: Implement all sceUtilityScreenshot* for real, it doesn't seem to be complex //but it requires more investigation static int sceUtilityScreenshotInitStart(u32 paramAddr) { - return hleReportWarning(Log::sceUtility, UtilityInitStart(UtilityDialogType::SCREENSHOT, screenshotDialog, paramAddr)); + return hleLogInfo(Log::sceUtility, UtilityInitStart(UtilityDialogType::SCREENSHOT, screenshotDialog, paramAddr)); } static int sceUtilityScreenshotShutdownStart() { diff --git a/Core/MIPS/Interpreter.cpp b/Core/MIPS/Interpreter.cpp index 7ed63a3dcc..84f0ee9ec8 100644 --- a/Core/MIPS/Interpreter.cpp +++ b/Core/MIPS/Interpreter.cpp @@ -155,7 +155,7 @@ namespace MIPSInt { } if (alignedAddr <= PC + 4 && alignedAddr + size >= PC - 4) { // This is probably rare so we don't use a static bool. - WARN_LOG_REPORT_ONCE(icacheInvalidatePC, Log::JIT, "Invalidating address near PC: %08x (%08x + %d) at PC=%08x", addr, R(rs), imm, PC); + WARN_LOG_ONCE(icacheInvalidatePC, Log::JIT, "Invalidating address near PC: %08x (%08x + %d) at PC=%08x", addr, R(rs), imm, PC); } } break; @@ -219,7 +219,6 @@ namespace MIPSInt { } void Int_Break(MIPSState *mips, MIPSOpcode op) { - Reporting::ReportMessage("BREAK instruction hit"); Core_BreakException(PC); PC += 4; } diff --git a/Core/MIPS/InterpreterVFPU.cpp b/Core/MIPS/InterpreterVFPU.cpp index fa091cb114..5200b4699b 100644 --- a/Core/MIPS/InterpreterVFPU.cpp +++ b/Core/MIPS/InterpreterVFPU.cpp @@ -23,11 +23,11 @@ #include "Common/Data/Convert/SmallDataConvert.h" #include "Common/Math/math_util.h" +#include "Common/Log.h" #include "Core/Compatibility.h" #include "Core/Core.h" #include "Core/MemMap.h" -#include "Core/Reporting.h" #include "Core/Config.h" #include "Core/System.h" @@ -1280,7 +1280,7 @@ namespace MIPSInt // Other sizes don't seem completely predictable. if (sz != V_Quad) { - ERROR_LOG_REPORT_ONCE(vbfy2, Log::CPU, "vfby2 with incorrect size"); + ERROR_LOG(Log::CPU, "vfby2 with incorrect size"); } } else { // vbfy1 @@ -1295,7 +1295,7 @@ namespace MIPSInt ApplyPrefixST(mips, t, VFPURewritePrefix(mips, VFPU_CTRL_TPREFIX, tprefixRemove, tprefixAdd), sz); if (sz != V_Quad && sz != V_Pair) { - ERROR_LOG_REPORT_ONCE(vbfy2, Log::CPU, "vfby1 with incorrect size"); + ERROR_LOG(Log::CPU, "vfby1 with incorrect size"); } } diff --git a/GPU/Common/DepalettizeShaderCommon.cpp b/GPU/Common/DepalettizeShaderCommon.cpp index b4f2181dce..315f678d5f 100644 --- a/GPU/Common/DepalettizeShaderCommon.cpp +++ b/GPU/Common/DepalettizeShaderCommon.cpp @@ -301,7 +301,7 @@ void GenerateDepalShaderFloat(ShaderWriter &writer, const DepalConfig &config) { // index_multiplier -= 0.01f / texturePixels; if (!formatOK) { - ERROR_LOG_REPORT_ONCE(depal, Log::G3D, "%s depal unsupported: shift=%d mask=%02x offset=%d", GeBufferFormatToString(config.bufferFormat), shift, mask, config.startPos); + ERROR_LOG_ONCE(depal, Log::G3D, "%s depal unsupported: shift=%d mask=%02x offset=%d", GeBufferFormatToString(config.bufferFormat), shift, mask, config.startPos); } // Offset by half a texel (plus clutBase) to turn NEAREST filtering into FLOOR. diff --git a/GPU/Common/VertexDecoderCommon.cpp b/GPU/Common/VertexDecoderCommon.cpp index 2a4b8656bc..d46cefe5d1 100644 --- a/GPU/Common/VertexDecoderCommon.cpp +++ b/GPU/Common/VertexDecoderCommon.cpp @@ -1222,7 +1222,7 @@ void VertexDecoder::SetVertexType(u32 fmt, const VertexDecoderOptions &options, memset(&decFmt, 0, sizeof(decFmt)); if (morphcount > 1) { - DEBUG_LOG_REPORT_ONCE(vtypeM, Log::G3D, "VTYPE with morph used: THRU=%i TC=%i COL=%i POS=%i NRM=%i WT=%i NW=%i IDX=%i MC=%i", (int)throughmode, tc, col, pos, nrm, weighttype, nweights, idx, morphcount); + DEBUG_LOG(Log::G3D, "VTYPE with morph used: THRU=%i TC=%i COL=%i POS=%i NRM=%i WT=%i NW=%i IDX=%i MC=%i", (int)throughmode, tc, col, pos, nrm, weighttype, nweights, idx, morphcount); } else { DEBUG_LOG(Log::G3D, "VTYPE: THRU=%i TC=%i COL=%i POS=%i NRM=%i WT=%i NW=%i IDX=%i MC=%i", (int)throughmode, tc, col, pos, nrm, weighttype, nweights, idx, morphcount); } diff --git a/GPU/GPUCommon.cpp b/GPU/GPUCommon.cpp index b41d7fa55b..463833ec61 100644 --- a/GPU/GPUCommon.cpp +++ b/GPU/GPUCommon.cpp @@ -2609,7 +2609,7 @@ bool GPUCommon::PerformMemoryCopy(u32 dest, u32 src, int size, GPUCopyFlag flags // Check for invalid memory range. Should we reject? For now, let's clamp it. if (Memory::ClampValidSizeAt(dest, size) < (u32)size) { - ERROR_LOG_REPORT_ONCE(invalidmemset, Log::G3D, "PerformMemorySet with invalid range: %08x, size %d", dest, size); + ERROR_LOG(Log::G3D, "PerformMemorySet with invalid range: %08x, size %d", dest, size); size = Memory::ClampValidSizeAt(dest, size); } @@ -2655,7 +2655,7 @@ bool GPUCommon::PerformMemorySet(u32 dest, u8 v, int size) { // Check for invalid memory range. Should we reject? For now, let's clamp it. if (Memory::ClampValidSizeAt(dest, size) < (u32)size) { - ERROR_LOG_REPORT_ONCE(invalidmemset, Log::G3D, "PerformMemorySet with invalid range: %08x, size %d", dest, size); + ERROR_LOG(Log::G3D, "PerformMemorySet with invalid range: %08x, size %d", dest, size); size = Memory::ClampValidSizeAt(dest, size); } diff --git a/GPU/GPUCommonHW.cpp b/GPU/GPUCommonHW.cpp index 405cb4dbbc..3211c520ea 100644 --- a/GPU/GPUCommonHW.cpp +++ b/GPU/GPUCommonHW.cpp @@ -1361,7 +1361,7 @@ void GPUCommonHW::Execute_Bezier(u32 op, u32 diff) { } if (vertTypeIsSkinningEnabled(vertType)) { - DEBUG_LOG_REPORT(Log::G3D, "Unusual bezier/spline vtype: %08x, morph: %d, bones: %d", vertType, (vertType & GE_VTYPE_MORPHCOUNT_MASK) >> GE_VTYPE_MORPHCOUNT_SHIFT, vertTypeGetNumBoneWeights(vertType)); + DEBUG_LOG(Log::G3D, "Unusual bezier/spline vtype: %08x, morph: %d, bones: %d", vertType, (vertType & GE_VTYPE_MORPHCOUNT_MASK) >> GE_VTYPE_MORPHCOUNT_SHIFT, vertTypeGetNumBoneWeights(vertType)); } // Can't flush after setting gstate_c.submitType below since it'll be a mess - it must be done already. diff --git a/GPU/Vulkan/DrawEngineVulkan.cpp b/GPU/Vulkan/DrawEngineVulkan.cpp index a691d8408a..3cdc37b190 100644 --- a/GPU/Vulkan/DrawEngineVulkan.cpp +++ b/GPU/Vulkan/DrawEngineVulkan.cpp @@ -361,7 +361,6 @@ void DrawEngineVulkan::Flush() { BindShaderBlendTex(); // This might cause copies so important to do before BindPipeline. if (!renderManager->BindPipeline(pipeline->pipeline, pipeline->pipelineFlags, pipelineLayout_)) { - renderManager->ReportBadStateForDraw(); ResetAfterSkippedDraw(); return; } @@ -520,7 +519,6 @@ void DrawEngineVulkan::Flush() { BindShaderBlendTex(); // This might cause copies so super important to do before BindPipeline. if (!renderManager->BindPipeline(pipeline->pipeline, pipeline->pipelineFlags, pipelineLayout_)) { - renderManager->ReportBadStateForDraw(); ResetAfterSkippedDraw(); return; } diff --git a/UI/DisplayLayoutScreen.cpp b/UI/DisplayLayoutScreen.cpp index 82be2d5738..3824d25c88 100644 --- a/UI/DisplayLayoutScreen.cpp +++ b/UI/DisplayLayoutScreen.cpp @@ -353,7 +353,7 @@ void DisplayLayoutScreen::CreateViews() { mode_->SetSelection(0, false); // The game goes to another output, like a TV, which doesn't use this layout. mode_->SetEnabled(screenManager()->FindOutput(OutputRole::Game) == nullptr); - mode_->ApplyRoundCorners(); + mode_->SetRoundCorners(); bottomControls->Add(mode_); } @@ -428,7 +428,7 @@ void DisplayLayoutScreen::CreateViews() { return g_Config.bStereoRendering && multiViewSupported; }; - leftColumn->ApplyRoundCorners(); + leftColumn->SetRoundCorners(); leftColumn->Add(new ItemHeader(gr->T("Postprocessing shaders"))); diff --git a/UI/DriverManagerScreen.cpp b/UI/DriverManagerScreen.cpp index c66cab65ef..5d6d97551e 100644 --- a/UI/DriverManagerScreen.cpp +++ b/UI/DriverManagerScreen.cpp @@ -114,10 +114,10 @@ public: DriverChoice::DriverChoice(const std::string &driverName, bool current, UI::LayoutParams *layoutParams) : UI::LinearLayout(ORIENT_VERTICAL, layoutParams), name_(driverName) { using namespace UI; - SetSpacing(2.0f); + SetSpacing(0.0f); if (!layoutParams) { layoutParams_->width = FILL_PARENT; - layoutParams_->height = 220; + layoutParams_->height = WRAP_CONTENT; } auto gr = GetI18NCategory(I18NCat::GRAPHICS); auto di = GetI18NCategory(I18NCat::DIALOG); @@ -126,7 +126,7 @@ DriverChoice::DriverChoice(const std::string &driverName, bool current, UI::Layo DriverMeta meta{}; bool isDefault = driverName.empty(); if (isDefault) { - meta.description = gr->T("Default GPU driver"); + meta.name = gr->T("Default GPU driver"); } Path metaPath = GetDriverPath() / driverName / "meta.json"; @@ -135,7 +135,6 @@ DriverChoice::DriverChoice(const std::string &driverName, bool current, UI::Layo std::string errorStr; meta.Read(metaJson, &errorStr); } - Add(new Spacer(12.0)); #if PPSSPP_PLATFORM(ANDROID) bool usable = isDefault || meta.minApi <= System_GetPropertyInt(SYSPROP_SYSTEMVERSION); @@ -144,35 +143,34 @@ DriverChoice::DriverChoice(const std::string &driverName, bool current, UI::Layo bool usable = isDefault || true; #endif - Add(new ItemHeader(driverName.empty() ? gr->T("Default GPU driver") : driverName))->SetLarge(true); - if (current) { - Add(new NoticeView(NoticeLevel::SUCCESS, gr->T("Current GPU driver"), "")); - } - - auto horizBar = Add(new UI::LinearLayout(ORIENT_HORIZONTAL)); - std::string desc = meta.description; - if (!desc.empty()) desc += "\n"; - if (!isDefault) - desc += meta.vendor + ": " + meta.driverVersion; - horizBar->Add(new TextView(desc)); - if (!current && !isDefault) { - horizBar->Add(new Choice(ImageID("I_TRASHCAN"), new LinearLayoutParams(ITEM_HEIGHT, ITEM_HEIGHT)))->OnClick.Add([=](UI::EventParams &) { - UI::EventParams e{}; - e.s = name_; - OnDelete.Trigger(e); - }); - } + Choice *radio = Add(new Choice(meta.name, ImageID(current ? "I_RADIO_SELECTED" : "I_RADIO_EMPTY"), new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT))); if (usable) { if (!current) { - Add(new Choice(di->T("Select")))->OnClick.Add([=](UI::EventParams &) { + radio->OnClick.Add([this](UI::EventParams &) { UI::EventParams e{}; e.s = name_; OnUse.Trigger(e); }); } - } else { + } + if (!isDefault) { + std::string desc = meta.description; + Add(new InfoItem(desc, "", new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT))); + std::string vendorInfo = meta.vendor + ": " + meta.driverVersion; + Add(new InfoItem(vendorInfo, "", new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT))); + } + if (!current && !isDefault) { + Add(new Choice(di->T("Delete"), ImageID("I_TRASHCAN"), new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT)))->OnClick.Add([this](UI::EventParams &) { + UI::EventParams e{}; + e.s = name_; + OnDelete.Trigger(e); + }); + } + if (!usable) { Add(new NoticeView(NoticeLevel::WARN, ApplySafeSubstitutions(gr->T("Driver requires Android API version %1, current is %2"), meta.minApi, System_GetPropertyInt(SYSPROP_SYSTEMVERSION)),"")); } + + SetRoundCorners(); } DriverManagerScreen::DriverManagerScreen(const Path & gamePath) : UITabbedBaseDialogScreen(gamePath) {} @@ -184,58 +182,71 @@ void DriverManagerScreen::CreateTabs() { AddTab("DriverManagerDrivers", gr->T("Drivers"), [this](UI::LinearLayout *parent) { CreateDriverTab(parent); }); -} -void DriverManagerScreen::CreateDriverTab(UI::ViewGroup *drivers) { - using namespace UI; - auto di = GetI18NCategory(I18NCat::DIALOG); - auto gr = GetI18NCategory(I18NCat::GRAPHICS); - - // Like SettingsPage::Description(). - TextView *description = drivers->Add(new TextView(gr->T("CustomDriversDescription", "Custom drivers loaded through AdrenoTools replace the GPU driver that came with your device. They can be faster and have fewer bugs, but they can also be slower or less stable. Only install drivers made for your GPU. If rendering breaks, switch back to the default driver."), FLAG_WRAP_TEXT, false, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT, Margins(0, 4)))); - description->SetTextSize(TextSize::Small); - description->SetPadding(Margins(12)); - description->SetFrame(true); - - ChoiceGroupList *groups = drivers->Add(new ChoiceGroupList()); - - ChoiceGroup *driverManagerGroup = groups->Add(new ChoiceGroup(gr->T("Custom driver manager"))); - auto customDriverInstallChoice = driverManagerGroup->Add(new Choice(gr->T("Install custom driver..."))); - driverManagerGroup->Add(new Choice(di->T("More info")))->OnClick.Add([=](UI::EventParams &e) { - System_LaunchUrl(LaunchUrlType::BROWSER_URL, "https://www.ppsspp.org/docs/reference/custom-drivers/"); - }); - - // Turnip is Adreno-only. Keep the flags visible off Android, for debugging the screen. #if PPSSPP_PLATFORM(ANDROID) const bool showTurnipFlags = CheckKgslPresent(); #else const bool showTurnipFlags = true; #endif if (showTurnipFlags) { - ChoiceGroup *adrenoEnvVarGroup = groups->Add(new ChoiceGroup(gr->T("Turnip driver flags"))); - int count = 0; - const AdrenoEnvVarDef *adrenoEnvVarDefs = GetAdrenoEnvVarDefs(&count); - for (int i = 0; i < count; i++) { - adrenoEnvVarGroup->Add(new BitCheckBox(&g_Config.iAdrenoEnvVars, (int)adrenoEnvVarDefs[i].var, adrenoEnvVarDefs[i].name)); - } + AddTab("DriverManagerTurnipFlags", gr->T("Turnip driver flags"), [this](UI::LinearLayout *parent) { + CreateTurnipFlagsTab(parent); + }); } +} + +void DriverManagerScreen::CreateTurnipFlagsTab(UI::ViewGroup *parent) { + using namespace UI; + ChoiceGroupList *groups = parent->Add(new ChoiceGroupList()); + + // Turnip is Adreno-only. Keep the flags visible off Android, for debugging the screen. + ChoiceGroup *adrenoEnvVarGroup = groups->Add(new ChoiceGroup()); + int count = 0; + const AdrenoEnvVarDef *adrenoEnvVarDefs = GetAdrenoEnvVarDefs(&count); + for (int i = 0; i < count; i++) { + adrenoEnvVarGroup->Add(new BitCheckBox(&g_Config.iAdrenoEnvVars, (int)adrenoEnvVarDefs[i].var, adrenoEnvVarDefs[i].name)); + } +} + +void DriverManagerScreen::CreateDriverTab(UI::ViewGroup *parent) { + using namespace UI; + auto di = GetI18NCategory(I18NCat::DIALOG); + auto gr = GetI18NCategory(I18NCat::GRAPHICS); + + ChoiceGroupList *groups = parent->Add(new ChoiceGroupList()); + + // Like SettingsPage::Description(). + TextView *description = groups->Add(new TextView(gr->T("CustomDriversDescription", "Custom drivers loaded through AdrenoTools replace the GPU driver that came with your device. They can be faster and have fewer bugs, but they can also be slower or less stable. Only install drivers made for your GPU. If rendering breaks, switch back to the default driver."), FLAG_WRAP_TEXT, false, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT, Margins(0, 4)))); + description->SetTextSize(TextSize::Small); + description->SetPadding(Margins(12)); + description->SetFrame(true); + + Choice *moreInfo = groups->Add(new ChoiceGroup())->Add(new Choice(di->T("More info"))); + moreInfo->SetIconRight(ImageID("I_LINK_OUT")); + moreInfo->OnClick.Add([=](UI::EventParams &e) { + System_LaunchUrl(LaunchUrlType::BROWSER_URL, "https://www.ppsspp.org/docs/reference/custom-drivers/"); + }); + + ChoiceGroup *driverManagerGroup = groups->Add(new ChoiceGroup(gr->T("Custom driver manager"))); + auto customDriverInstallChoice = driverManagerGroup->Add(new Choice(gr->T("Install custom driver..."))); customDriverInstallChoice->OnClick.Handle(this, &DriverManagerScreen::OnCustomDriverInstall); - drivers->Add(new ItemHeader(gr->T("Drivers"))); - bool isDefault = g_Config.sCustomDriver.empty(); - drivers->Add(new DriverChoice("", isDefault))->OnUse.Handle(this, &DriverManagerScreen::OnCustomDriverChange); + groups->Add(new TextView(gr->T("Drivers")))->SetBig(true); + + const bool isDefault = g_Config.sCustomDriver.empty(); + groups->Add(new DriverChoice("", isDefault))->OnUse.Handle(this, &DriverManagerScreen::OnCustomDriverChange); const Path driverPath = GetDriverPath(); std::vector listing; if (File::GetFilesInDir(driverPath, &listing)) { for (auto driver : listing) { - auto choice = drivers->Add(new DriverChoice(driver.name, g_Config.sCustomDriver == driver.name)); + // A DriverChoice is itself a group. + auto choice = groups->Add(new DriverChoice(driver.name, g_Config.sCustomDriver == driver.name)); choice->OnUse.Handle(this, &DriverManagerScreen::OnCustomDriverChange); choice->OnDelete.Handle(this, &DriverManagerScreen::OnCustomDriverUninstall); } } - drivers->Add(new Spacer(12.0)); } void DriverManagerScreen::OnCustomDriverChange(UI::EventParams &e) { diff --git a/UI/DriverManagerScreen.h b/UI/DriverManagerScreen.h index ba8731e924..611d55f0f0 100644 --- a/UI/DriverManagerScreen.h +++ b/UI/DriverManagerScreen.h @@ -27,4 +27,5 @@ private: void OnCustomDriverChange(UI::EventParams &e); void CreateDriverTab(UI::ViewGroup *drivers); + void CreateTurnipFlagsTab(UI::ViewGroup *turnipFlags); }; diff --git a/UI/GameBrowser.cpp b/UI/GameBrowser.cpp index b40a08612d..e544917f3b 100644 --- a/UI/GameBrowser.cpp +++ b/UI/GameBrowser.cpp @@ -516,7 +516,7 @@ void GameBrowser::Refresh() { layoutChoice->AddChoice(ImageID("I_GRID")); layoutChoice->AddChoice(ImageID("I_LARGE_LIST")); layoutChoice->SetSelection((int)lastViewMode_, false); - layoutChoice->ApplyRoundCorners(); + layoutChoice->SetRoundCorners(); layoutChoice->OnChoice.Handle(this, &GameBrowser::LayoutChange); if (!isRecent) { Choice *rotateChoice = topBar->Add(new Choice(ImageID("I_ROTATE_LEFT"), new LayoutParams(64.0f, 64.0f))); diff --git a/UI/MainScreen.cpp b/UI/MainScreen.cpp index 169521831d..4f8247dfbb 100644 --- a/UI/MainScreen.cpp +++ b/UI/MainScreen.cpp @@ -386,7 +386,7 @@ void MainScreen::CreateMainButtons(UI::LinearLayout *parent, bool portrait) { gold->SetImageScale(0.6f); // for the left icon. gold->SetShine(true); } - parent->ApplyRoundCorners(); + parent->SetRoundCorners(); return; } else { ChoiceGroupList *buttons = parent->Add(new ChoiceGroupList()); diff --git a/UI/MiscScreens.cpp b/UI/MiscScreens.cpp index 941bd0c755..cffe0042a0 100644 --- a/UI/MiscScreens.cpp +++ b/UI/MiscScreens.cpp @@ -602,8 +602,8 @@ void CreditsScreen::CreateDialogViews(UI::ViewGroup *parent) { right->Add(new Spacer(0.0f, new LinearLayoutParams(1.0f))); } - left->ApplyRoundCorners(); - right->ApplyRoundCorners(); + left->SetRoundCorners(); + right->SetRoundCorners(); int rightYOffset = 0; if (!System_GetPropertyBool(SYSPROP_APP_GOLD)) { @@ -641,8 +641,8 @@ void CreditsScreen::CreateDialogViews(UI::ViewGroup *parent) { }); } - left->ApplyRoundCorners(); - right->ApplyRoundCorners(); + left->SetRoundCorners(); + right->SetRoundCorners(); } void CreditsScreen::update() { diff --git a/UI/NativeApp.cpp b/UI/NativeApp.cpp index cce3356ba9..821531d3bc 100644 --- a/UI/NativeApp.cpp +++ b/UI/NativeApp.cpp @@ -142,6 +142,7 @@ #include "UI/DiscordIntegration.h" #include "UI/EmuScreen.h" #include "UI/FirmwareScreen.h" +#include "UI/DriverManagerScreen.h" #include "UI/GameInfoCache.h" #include "UI/GameSettingsScreen.h" #include "UI/GPUDriverTestScreen.h" @@ -921,6 +922,9 @@ void NativeInit(int argc, const char *argv[], const CommandLineOptions &cmdLineO } else if (equals(cmdLineOptions.startScreen.value(), "credits")) { g_screenManager->switchScreen(new MainScreen()); g_screenManager->push(new CreditsScreen()); + } else if (equals(cmdLineOptions.startScreen.value(), "driver")) { + g_screenManager->switchScreen(new MainScreen()); + g_screenManager->push(new DriverManagerScreen(Path())); } else { WARN_LOG(Log::System, "Unknown start screen '%s'", cmdLineOptions.startScreen.value().c_str()); g_screenManager->switchScreen(new LogoScreen(AfterLogoScreen::DEFAULT)); diff --git a/UI/PauseScreen.cpp b/UI/PauseScreen.cpp index 3dd72888a7..ac48ce9c4f 100644 --- a/UI/PauseScreen.cpp +++ b/UI/PauseScreen.cpp @@ -526,7 +526,7 @@ void GamePauseScreen::CreateSavestateControls(UI::LinearLayout *leftColumnItems, if (buttonRow->GetNumSubviews() == 0) { delete buttonRow; } else { - buttonRow->ApplyRoundCorners(); + buttonRow->SetRoundCorners(); *extraRow = buttonRow; } } @@ -666,7 +666,7 @@ void GamePauseScreen::CreateViews() { horiz->Add(new Choice(di->T("More info"), ImageID("I_LINK_OUT_QUESTION"), new LinearLayoutParams(WRAP_CONTENT, WRAP_CONTENT)))->OnClick.Add([](UI::EventParams &e) { System_LaunchUrl(LaunchUrlType::BROWSER_URL, "https://www.ppsspp.org/docs/troubleshooting/save-state-time-warps"); }); - horiz->ApplyRoundCorners(); + horiz->SetRoundCorners(); } LinearLayout *extraRow = nullptr; CreateSavestateControls(saveDataScrollItems, &extraRow); @@ -854,7 +854,7 @@ void GamePauseScreen::CreateViews() { }); } - middleColumn->ApplyRoundCorners(); + middleColumn->SetRoundCorners(); } else { playButton_ = nullptr; } diff --git a/UI/RetroAchievementScreens.cpp b/UI/RetroAchievementScreens.cpp index 2b3f24e9e4..e62d4ce446 100644 --- a/UI/RetroAchievementScreens.cpp +++ b/UI/RetroAchievementScreens.cpp @@ -35,7 +35,7 @@ public: constexpr double MAX_AUDIO_DURATION_SECONDS = 5.0; AudioFileChooser::AudioFileChooser(RequesterToken token, std::string *value, std::string_view title, UI::UISound sound, UI::LayoutParams *layoutParams) : UI::LinearLayout(ORIENT_HORIZONTAL, layoutParams), sound_(sound) { using namespace UI; - SetSpacing(2.0f); + SetSpacing(0.0f); if (!layoutParams) { layoutParams_->width = FILL_PARENT; layoutParams_->height = ITEM_HEIGHT; @@ -455,6 +455,7 @@ void RetroAchievementsSettingsScreen::CreateAccountTab(UI::ViewGroup *viewGroup) System_LaunchUrl(LaunchUrlType::BROWSER_URL, "https://retroachievements.org/createaccount.php"); }); regLink->SetIconRight(ImageID("I_LINK_OUT")); + regLink->SetRoundCorners(); } using namespace UI; diff --git a/UI/SavedataScreen.cpp b/UI/SavedataScreen.cpp index 7e62c2affc..5bbab0cc07 100644 --- a/UI/SavedataScreen.cpp +++ b/UI/SavedataScreen.cpp @@ -193,7 +193,7 @@ void SavedataPopupScreen::CreatePopupContents(UI::ViewGroup *parent) { System_ShowFileInFolder(savePath_); }); } - buttonRow->ApplyRoundCorners(); + buttonRow->SetRoundCorners(); parent->Add(buttonRow); } @@ -624,7 +624,7 @@ void SavedataScreen::CreateSavedataTab(UI::ViewGroup *savedata) { sortOption_ = SavedataSortOption(e.a); dataBrowser_->SetSortOption(sortOption_); }); - sortStrip->ApplyRoundCorners(); + sortStrip->SetRoundCorners(); savedata->Add(sortStrip); dataBrowser_ = savedata->Add(new SavedataBrowser(savedata_dir, new LayoutParams(FILL_PARENT, FILL_PARENT))); @@ -650,7 +650,7 @@ void SavedataScreen::CreateSavestateTab(UI::ViewGroup *savestate) { sortOption_ = SavedataSortOption(e.a); stateBrowser_->SetSortOption(sortOption_); }); - sortStrip->ApplyRoundCorners(); + sortStrip->SetRoundCorners(); savestate->Add(sortStrip); stateBrowser_ = savestate->Add(new SavedataBrowser(savestate_dir)); diff --git a/UI/TouchControlLayoutScreen.cpp b/UI/TouchControlLayoutScreen.cpp index 82a139e440..5630dac646 100644 --- a/UI/TouchControlLayoutScreen.cpp +++ b/UI/TouchControlLayoutScreen.cpp @@ -665,7 +665,7 @@ void TouchControlLayoutScreen::CreateViews() { layoutView_->mode_ = mode; } }); - mode_->ApplyRoundCorners(); + mode_->SetRoundCorners(); leftColumn->Add(mode_); leftColumn->Add(new Choice(co->T("Customize")))->OnClick.Add([this](UI::EventParams &e) { @@ -680,7 +680,7 @@ void TouchControlLayoutScreen::CreateViews() { leftColumn->Add(new Choice(di->T("Reset")))->OnClick.Handle(this, &TouchControlLayoutScreen::OnReset); leftColumn->Add(new Choice(di->T("Back"), ImageID("I_NAVIGATE_BACK")))->OnClick.Handle(this, &UIScreen::OnBack); - leftColumn->ApplyRoundCorners(); + leftColumn->SetRoundCorners(); leftColumnScroll->SetShadows(false);