mirror of
https://github.com/cemu-project/Cemu.git
synced 2024-11-25 18:46:55 +01:00
Minor code improvements (#1124)
This commit is contained in:
parent
eaa82817dd
commit
42d14eec96
@ -973,7 +973,7 @@ void _emitOperandInputCode(LatteDecompilerShaderContext* shaderContext, LatteDec
|
||||
}
|
||||
else
|
||||
{
|
||||
cemuLog_log(LogType::Force, "Unsupported shader ALU operand sel 0x%x\n", aluInstruction->sourceOperand[operandIndex].sel);
|
||||
cemuLog_log(LogType::Force, "Unsupported shader ALU operand sel {:#x}\n", aluInstruction->sourceOperand[operandIndex].sel);
|
||||
debugBreakpoint();
|
||||
}
|
||||
|
||||
|
@ -30,8 +30,6 @@ public:
|
||||
void Flush(bool waitIdle = false) override;
|
||||
void NotifyLatteCommandProcessorIdle() override;
|
||||
|
||||
void UpdateVSyncState();
|
||||
|
||||
void EnableDebugMode() override;
|
||||
void SwapBuffers(bool swapTV = true, bool swapDRC = true) override;
|
||||
|
||||
|
@ -706,8 +706,8 @@ SwapchainInfoVk& VulkanRenderer::GetChainInfo(bool mainWindow) const
|
||||
|
||||
void VulkanRenderer::StopUsingPadAndWait()
|
||||
{
|
||||
m_destroyPadSwapchainNextAcquire = true;
|
||||
m_padCloseReadySemaphore.wait();
|
||||
m_destroyPadSwapchainNextAcquire.test_and_set();
|
||||
m_destroyPadSwapchainNextAcquire.wait(true);
|
||||
}
|
||||
|
||||
bool VulkanRenderer::IsPadWindowActive()
|
||||
@ -2557,11 +2557,11 @@ bool VulkanRenderer::AcquireNextSwapchainImage(bool mainWindow)
|
||||
if(!IsSwapchainInfoValid(mainWindow))
|
||||
return false;
|
||||
|
||||
if(!mainWindow && m_destroyPadSwapchainNextAcquire)
|
||||
if(!mainWindow && m_destroyPadSwapchainNextAcquire.test())
|
||||
{
|
||||
RecreateSwapchain(mainWindow, true);
|
||||
m_destroyPadSwapchainNextAcquire = false;
|
||||
m_padCloseReadySemaphore.notify();
|
||||
m_destroyPadSwapchainNextAcquire.clear();
|
||||
m_destroyPadSwapchainNextAcquire.notify_all();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -414,8 +414,7 @@ private:
|
||||
}m_state;
|
||||
|
||||
std::unique_ptr<SwapchainInfoVk> m_mainSwapchainInfo{}, m_padSwapchainInfo{};
|
||||
Semaphore m_padCloseReadySemaphore;
|
||||
bool m_destroyPadSwapchainNextAcquire = false;
|
||||
std::atomic_flag m_destroyPadSwapchainNextAcquire{};
|
||||
bool IsSwapchainInfoValid(bool mainWindow) const;
|
||||
|
||||
VkRenderPass m_imguiRenderPass = VK_NULL_HANDLE;
|
||||
|
@ -258,48 +258,48 @@ DRC flat on table, screen facing up. Top pointing away (away from person, pointi
|
||||
0.03 0.99 -0.13
|
||||
0.01 0.13 0.99
|
||||
|
||||
Turned 45° to the right:
|
||||
Turned 45° to the right:
|
||||
0.71 -0.03 0.71
|
||||
0.12 0.99 -0.08
|
||||
-0.70 0.14 0.70
|
||||
|
||||
Turned 45° to the right (top of GamePad pointing right now):
|
||||
Turned 45° to the right (top of GamePad pointing right now):
|
||||
0.08 -0.03 1.00 -> Z points towards person
|
||||
0.15 0.99 0.01
|
||||
-0.99 0.15 0.09 -> DRC Z-Axis now points towards X-minus
|
||||
|
||||
Turned 90° to the right (top of gamepad now pointing towards holder, away from monitor):
|
||||
Turned 90° to the right (top of gamepad now pointing towards holder, away from monitor):
|
||||
-1.00 -0.01 0.06
|
||||
0.00 0.99 0.15
|
||||
-0.06 0.15 -0.99
|
||||
|
||||
Turned 90° to the right (pointing left):
|
||||
Turned 90° to the right (pointing left):
|
||||
-0.17 -0.01 -0.99
|
||||
-0.13 0.99 0.02
|
||||
0.98 0.13 -0.17
|
||||
|
||||
After another 90° we end up in the initial position:
|
||||
After another 90° we end up in the initial position:
|
||||
0.99 -0.03 -0.11
|
||||
0.01 0.99 -0.13
|
||||
0.12 0.12 0.99
|
||||
|
||||
------
|
||||
From initial position, lean the GamePad on its left side. 45° up. So the screen is pointing to the top left
|
||||
From initial position, lean the GamePad on its left side. 45° up. So the screen is pointing to the top left
|
||||
0.66 -0.75 -0.03
|
||||
0.74 0.66 -0.11
|
||||
0.10 0.05 0.99
|
||||
|
||||
Further 45°, GamePad now on its left, screen pointing left:
|
||||
Further 45°, GamePad now on its left, screen pointing left:
|
||||
-0.03 -1.00 -0.00
|
||||
0.99 -0.03 -0.15
|
||||
0.15 -0.01 0.99
|
||||
|
||||
From initial position, lean the GamePad on its right side. 45° up. So the screen is pointing to the top right
|
||||
From initial position, lean the GamePad on its right side. 45° up. So the screen is pointing to the top right
|
||||
0.75 0.65 -0.11
|
||||
-0.65 0.76 0.07
|
||||
0.12 0.02 0.99
|
||||
|
||||
From initial position, tilt the GamePad up 90° (bottom side remains in touch with surface):
|
||||
From initial position, tilt the GamePad up 90° (bottom side remains in touch with surface):
|
||||
0.99 -0.05 -0.10
|
||||
-0.10 0.01 -0.99
|
||||
0.05 1.00 0.01
|
||||
@ -309,7 +309,7 @@ From initial position, stand the GamePad on its top side:
|
||||
0.09 -0.01 1.00
|
||||
-0.01 -1.00 -0.01
|
||||
|
||||
Rotate GamePad 180° around x axis, so it now lies on its screen (top of GamePad pointing to holder):
|
||||
Rotate GamePad 180° around x axis, so it now lies on its screen (top of GamePad pointing to holder):
|
||||
0.99 -0.03 -0.15
|
||||
-0.04 -1.00 -0.08
|
||||
-0.15 0.09 -0.99
|
||||
|
Loading…
Reference in New Issue
Block a user