this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Basic SDL keyboard + mouse working

+34 -4
+2
src/OpenGL/CMakeLists.txt
··· 26 26 27 27 set_property(TARGET OpenGL APPEND_STRING PROPERTY LINK_FLAGS 28 28 " -sub_library libGL") 29 + InstallSymlink(Versions/Current/Libraries 30 + "${CMAKE_INSTALL_PREFIX}/libexec/darling/System/Library/Frameworks/OpenGL.framework/Libraries")
+29
src/frameworks/Carbon/HIToolbox/TextInputSources.mm
··· 1 1 #include "TextInputSources.h" 2 2 #include <CoreFoundation/CFDictionary.h> 3 3 #include <CoreFoundation/CFData.h> 4 + #include <os/lock.h> 4 5 #import <AppKit/NSDisplay.h> 5 6 7 + static os_unfair_lock g_keyboardLock = OS_UNFAIR_LOCK_INIT; 8 + static int g_lastKeyboardLayoutId = -1; 9 + static TISInputSourceRef g_lastKeyboardLayout = NULL; 10 + 6 11 TISInputSourceRef TISCopyCurrentKeyboardLayoutInputSource(void) 7 12 { 8 13 NSDisplay* display = [NSClassFromString(@"NSDisplay") currentDisplay]; 9 14 if (!display) 10 15 return NULL; 16 + const int curLayoutId = [display keyboardLayoutId]; 17 + 18 + if (g_lastKeyboardLayoutId != -1 && g_lastKeyboardLayout != NULL) 19 + { 20 + os_unfair_lock_lock(&g_keyboardLock); 21 + if (curLayoutId == g_lastKeyboardLayoutId) 22 + { 23 + TISInputSourceRef rv = (TISInputSourceRef) CFRetain((CFDictionaryRef) g_lastKeyboardLayout); 24 + os_unfair_lock_unlock(&g_keyboardLock); 25 + return rv; 26 + } 27 + os_unfair_lock_unlock(&g_keyboardLock); 28 + } 11 29 12 30 uint32_t length; 13 31 UCKeyboardLayout* layout = [display keyboardLayout: &length]; ··· 22 40 CFDictionaryRef dict = CFDictionaryCreate(NULL, keys, values, 1, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); 23 41 24 42 CFRelease(data); 43 + 44 + os_unfair_lock_lock(&g_keyboardLock); 45 + 46 + if (g_lastKeyboardLayout) 47 + CFRelease(g_lastKeyboardLayout); 48 + 49 + g_lastKeyboardLayout = (TISInputSourceRef) CFRetain(dict); 50 + g_lastKeyboardLayoutId = curLayoutId; 51 + 52 + os_unfair_lock_unlock(&g_keyboardLock); 53 + 25 54 return (TISInputSourceRef) dict; 26 55 } 27 56
+3
src/frameworks/CoreServices/UnicodeUtilities.cpp
··· 23 23 #include <unicode/sortkey.h> 24 24 #include <string> 25 25 #include <cstring> 26 + #include <iostream> 26 27 #include "UniChar.h" 27 28 #include "MacErrors.h" 28 29 ··· 226 227 { 227 228 unicodeString[0] = c; 228 229 } 230 + 231 + // std::cout << "UCKeyTranslate() virtualKeyCode: " << virtualKeyCode << " -> UC " << unicodeString[0] << std::endl; 229 232 230 233 return noErr; 231 234 }
-4
src/native/CMakeLists.txt
··· 13 13 wrap_elf(cairo libcairo.so) 14 14 wrap_elf(EGL libEGL.so) 15 15 wrap_elf(fontconfig libfontconfig.so) 16 - 17 - 18 16 wrap_elf(GL libGL.so "/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries") 19 - InstallSymlink(Versions/Current/Libraries 20 - "${CMAKE_INSTALL_PREFIX}/libexec/darling/System/Library/Frameworks/OpenGL.framework/Libraries")