mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-07-31 11:09:17 +02:00
Merge pull request #18135 from hrydgard/assorted-fixes-6
Fix closing the chat window with ESC, add some asserts
This commit is contained in:
@@ -241,8 +241,7 @@ public:
|
||||
}
|
||||
|
||||
void BindPipeline(VKRGraphicsPipeline *pipeline, PipelineFlags flags, VkPipelineLayout pipelineLayout) {
|
||||
_dbg_assert_(curRenderStep_ && curRenderStep_->stepType == VKRStepType::RENDER);
|
||||
_dbg_assert_(pipeline != nullptr);
|
||||
_assert_(curRenderStep_ && curRenderStep_->stepType == VKRStepType::RENDER && pipeline != nullptr);
|
||||
VkRenderData &data = curRenderStep_->commands.push_uninitialized();
|
||||
data.cmd = VKRRenderCommand::BIND_GRAPHICS_PIPELINE;
|
||||
pipelinesToCheck_.push_back(pipeline);
|
||||
|
||||
@@ -91,19 +91,19 @@ bool UIScreen::UnsyncTouch(const TouchInput &touch) {
|
||||
}
|
||||
}
|
||||
|
||||
std::lock_guard<std::mutex> guard(eventQueueLock_);
|
||||
QueuedEvent ev{};
|
||||
ev.type = QueuedEventType::TOUCH;
|
||||
ev.touch = touch;
|
||||
std::lock_guard<std::mutex> guard(eventQueueLock_);
|
||||
eventQueue_.push_back(ev);
|
||||
return false;
|
||||
}
|
||||
|
||||
void UIScreen::UnsyncAxis(const AxisInput &axis) {
|
||||
std::lock_guard<std::mutex> guard(eventQueueLock_);
|
||||
QueuedEvent ev{};
|
||||
ev.type = QueuedEventType::AXIS;
|
||||
ev.axis = axis;
|
||||
std::lock_guard<std::mutex> guard(eventQueueLock_);
|
||||
eventQueue_.push_back(ev);
|
||||
}
|
||||
|
||||
@@ -123,10 +123,10 @@ bool UIScreen::UnsyncKey(const KeyInput &key) {
|
||||
}
|
||||
}
|
||||
|
||||
std::lock_guard<std::mutex> guard(eventQueueLock_);
|
||||
QueuedEvent ev{};
|
||||
ev.type = QueuedEventType::KEY;
|
||||
ev.key = key;
|
||||
std::lock_guard<std::mutex> guard(eventQueueLock_);
|
||||
eventQueue_.push_back(ev);
|
||||
return retval;
|
||||
}
|
||||
|
||||
@@ -180,6 +180,7 @@ static std::string CutFromMain(std::string str) {
|
||||
static VulkanPipeline *CreateVulkanPipeline(VulkanRenderManager *renderManager, VkPipelineCache pipelineCache,
|
||||
VkPipelineLayout layout, PipelineFlags pipelineFlags, VkSampleCountFlagBits sampleCount, const VulkanPipelineRasterStateKey &key,
|
||||
const DecVtxFormat *decFmt, VulkanVertexShader *vs, VulkanFragmentShader *fs, VulkanGeometryShader *gs, bool useHwTransform, u32 variantBitmask, bool cacheLoad) {
|
||||
_assert_(fs && vs);
|
||||
|
||||
if (!fs->GetModule()) {
|
||||
ERROR_LOG(G3D, "Fragment shader missing in CreateVulkanPipeline");
|
||||
@@ -189,6 +190,10 @@ static VulkanPipeline *CreateVulkanPipeline(VulkanRenderManager *renderManager,
|
||||
ERROR_LOG(G3D, "Vertex shader missing in CreateVulkanPipeline");
|
||||
return nullptr;
|
||||
}
|
||||
if (gs && !gs->GetModule()) {
|
||||
ERROR_LOG(G3D, "Geometry shader missing in CreateVulkanPipeline");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
VulkanPipeline *vulkanPipeline = new VulkanPipeline();
|
||||
vulkanPipeline->desc = new VKRGraphicsPipelineDesc();
|
||||
|
||||
+4
-4
@@ -844,16 +844,16 @@ bool EmuScreen::UnsyncKey(const KeyInput &key) {
|
||||
System_Notify(SystemNotification::ACTIVITY);
|
||||
|
||||
if (UI::IsFocusMovementEnabled()) {
|
||||
if (UIScreen::UnsyncKey(key)) {
|
||||
return true;
|
||||
} else if ((key.flags & KEY_DOWN) != 0 && UI::IsEscapeKey(key)) {
|
||||
bool retval = UIScreen::UnsyncKey(key);
|
||||
if ((key.flags & KEY_DOWN) != 0 && UI::IsEscapeKey(key)) {
|
||||
if (chatMenu_)
|
||||
chatMenu_->Close();
|
||||
if (chatButton_)
|
||||
chatButton_->SetVisibility(UI::V_VISIBLE);
|
||||
UI::EnableFocusMovement(false);
|
||||
return true;
|
||||
retval = true;
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
return controlMapper_.Key(key, &pauseTrigger_);
|
||||
|
||||
Reference in New Issue
Block a user