Fixes button scaling; Logging header cleanup
This commit is contained in:
1 parent
02b5039ca1
commit
e1ff27c298
4 files changed
+13
-28
No files matched your search
@@ -85,7 +85,7 @@
|
||||
self.properties[@"width"] = @([self.properties[@"width"] floatValue] * savedScale / currentScale);
|
||||
self.properties[@"height"] = @([self.properties[@"height"] floatValue] * savedScale / currentScale);
|
||||
}
|
||||
current_control_object[@"scaledAt"] = getPreference(@"button_scale");
|
||||
//current_control_object[@"scaledAt"] = getPreference(@"button_scale");
|
||||
}
|
||||
|
||||
- (NSString *)processFunctions:(NSString *)string {
|
||||
|
||||
@@ -246,14 +246,12 @@ JNIEXPORT void JNICALL Java_net_kdt_pojavlaunch_uikit_UIKit_updateMCGuiScale(JNI
|
||||
}
|
||||
|
||||
JNIEXPORT jstring JNICALL Java_org_lwjgl_glfw_CallbackBridge_nativeClipboard(JNIEnv* env, jclass clazz, jint action, jstring copySrc) {
|
||||
DEBUG_LOGD("Debug: Clipboard access is going on\n");
|
||||
debugLog("Debug: Clipboard access is going on\n");
|
||||
return UIKit_accessClipboard(env, action, copySrc);
|
||||
}
|
||||
|
||||
JNIEXPORT jboolean JNICALL Java_org_lwjgl_glfw_CallbackBridge_nativeSetInputReady(JNIEnv* env, jclass clazz, jboolean inputReady) {
|
||||
#ifdef DEBUG
|
||||
LOGD("Debug: Changing input state, isReady=%d, isUseStackQueueCall=%d\n", inputReady, isUseStackQueueCall);
|
||||
#endif
|
||||
debugLog("Debug: Changing input state, isReady=%d, isUseStackQueueCall=%d\n", inputReady, isUseStackQueueCall);
|
||||
isInputReady = inputReady;
|
||||
|
||||
return isUseStackQueueCall;
|
||||
@@ -377,11 +375,9 @@ void CallbackBridge_nativeSendKey(int key, int scancode, int action, int mods) {
|
||||
}
|
||||
|
||||
void CallbackBridge_nativeSendKeycode(int keycode, char keychar, int scancode, int action, int mods) {
|
||||
if (isInputReady) {
|
||||
CallbackBridge_nativeSendKey(keycode, scancode, action, mods);
|
||||
if (!CallbackBridge_nativeSendCharMods(keychar, mods)) {
|
||||
CallbackBridge_nativeSendChar(keychar);
|
||||
}
|
||||
CallbackBridge_nativeSendKey(keycode, scancode, action, mods);
|
||||
if (!CallbackBridge_nativeSendCharMods(keychar, mods)) {
|
||||
CallbackBridge_nativeSendChar(keychar);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,23 +4,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define LOGE(...) printf(__VA_ARGS__)
|
||||
#define LOGW(...) printf(__VA_ARGS__)
|
||||
#define LOGI(...) printf(__VA_ARGS__)
|
||||
#define LOGD(...) printf(__VA_ARGS__)
|
||||
|
||||
#ifdef DEBUG
|
||||
# define DEBUG_LOGE(...) LOGE(__VA_ARGS__)
|
||||
# define DEBUG_LOGW(...) LOGW(__VA_ARGS__)
|
||||
# define DEBUG_LOGI(...) LOGI(__VA_ARGS__)
|
||||
# define DEBUG_LOGD(...) LOGD(__VA_ARGS__)
|
||||
#else
|
||||
# define DEBUG_LOGE(...)
|
||||
# define DEBUG_LOGW(...)
|
||||
# define DEBUG_LOGI(...)
|
||||
# define DEBUG_LOGD(...)
|
||||
#endif
|
||||
|
||||
void regLog(const char *message, ...) __attribute__((format(printf, 1, 2)));
|
||||
void debugLog(const char *message, ...) __attribute__((format(printf, 1, 2)));
|
||||
|
||||
|
||||
+7
-1
@@ -11,7 +11,13 @@ void regLog(const char *message,...) {
|
||||
|
||||
void debugLog(const char *message,...)
|
||||
{
|
||||
if([getPreference(@"debug_logging") boolValue] == true) {
|
||||
if([getPreference(@"debug_logging") boolValue]) {
|
||||
va_list args;
|
||||
va_start(args, message);
|
||||
NSLog(@"%@",[[NSString alloc] initWithFormat:[NSString stringWithUTF8String:message] arguments:args]);
|
||||
va_end(args);
|
||||
} else {
|
||||
NSLog(@"WARNING!!! DEBUG LOG DISABLED");
|
||||
va_list args;
|
||||
va_start(args, message);
|
||||
NSLog(@"%@",[[NSString alloc] initWithFormat:[NSString stringWithUTF8String:message] arguments:args]);
|
||||
|
||||
Reference in new issue
Block a user