2
0
Эх сурвалжийг харах

renderer: do not invert cursor in GL mode

osy 3 жил өмнө
parent
commit
93979b61a4

+ 4 - 0
CocoaSpice/CSDisplayMetal.m

@@ -720,6 +720,10 @@ static void cs_channel_destroy(SpiceSession *s, SpiceChannel *channel, gpointer
     return point;
 }
 
+- (BOOL)cursorInverted {
+    return !self.isGLEnabled;
+}
+
 - (void)forceCursorPosition:(CGPoint)pos {
     self.mouseGuest = pos;
 }

+ 1 - 0
Renderer/UTMRenderSource.h

@@ -32,6 +32,7 @@ NS_ASSUME_NONNULL_BEGIN
 @property (nonatomic, readonly) NSUInteger cursorNumVertices;
 @property (nonatomic, nullable, readonly) id<MTLBuffer> displayVertices;
 @property (nonatomic, nullable, readonly) id<MTLBuffer> cursorVertices;
+@property (nonatomic, readonly) BOOL cursorInverted;
 
 - (void)rendererFrameHasRendered;
 

+ 1 - 1
Renderer/UTMRenderer.m

@@ -215,7 +215,7 @@ static matrix_float4x4 matrix_scale_translate(CGFloat scale, CGPoint translate)
         if (source.cursorVisible) {
             // Next render the cursor
             bool hasAlpha = YES;
-            bool isInverted = YES;
+            bool isInverted = source.cursorInverted;
             matrix_float4x4 transform = matrix_scale_translate(source.viewportScale,
                                                                CGPointMake(source.viewportOrigin.x +
                                                                            source.cursorOrigin.x,