Set viewUpdated=true for macOS scroll wheel, open vulkanExamples window in front of Xcode, accept mouse click-through on macOS
This commit is contained in:
parent
8bc8d14cf2
commit
a184bd7007
3 changed files with 10 additions and 1 deletions
|
|
@ -1549,6 +1549,8 @@ dispatch_group_t concurrentGroup;
|
|||
|
||||
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
|
||||
{
|
||||
[NSApp activateIgnoringOtherApps:YES]; // SRS - Make sure app window launches in front of Xcode window
|
||||
|
||||
concurrentGroup = dispatch_group_create();
|
||||
dispatch_queue_t concurrentQueue = dispatch_get_global_queue(QOS_CLASS_USER_INTERACTIVE, 0);
|
||||
dispatch_group_async(concurrentGroup, concurrentQueue, ^{
|
||||
|
|
@ -1628,6 +1630,11 @@ static CVReturn displayLinkOutputCallback(CVDisplayLinkRef displayLink, const CV
|
|||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)acceptsFirstMouse:(NSEvent *)event
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)keyDown:(NSEvent*)event
|
||||
{
|
||||
switch (event.keyCode)
|
||||
|
|
@ -1751,6 +1758,7 @@ static CVReturn displayLinkOutputCallback(CVDisplayLinkRef displayLink, const CV
|
|||
short wheelDelta = [event deltaY];
|
||||
vulkanExample->camera.translate(glm::vec3(0.0f, 0.0f,
|
||||
-(float)wheelDelta * 0.05f * vulkanExample->camera.movementSpeed));
|
||||
vulkanExample->viewUpdated = true;
|
||||
}
|
||||
|
||||
// SRS - Window resizing already handled by windowResize() in VulkanExampleBase::submitFrame()
|
||||
|
|
|
|||
|
|
@ -96,7 +96,6 @@ class VulkanExampleBase
|
|||
{
|
||||
private:
|
||||
std::string getWindowTitle();
|
||||
bool viewUpdated = false;
|
||||
uint32_t destWidth;
|
||||
uint32_t destHeight;
|
||||
bool resizing = false;
|
||||
|
|
@ -177,6 +176,7 @@ protected:
|
|||
public:
|
||||
bool prepared = false;
|
||||
bool resized = false;
|
||||
bool viewUpdated = false;
|
||||
uint32_t width = 1280;
|
||||
uint32_t height = 720;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue