Kore sync
This commit is contained in:
@ -13,21 +13,17 @@
|
||||
|
||||
#include <kinc/backend/windowdata.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
bool withAutoreleasepool(bool (*f)(void)) {
|
||||
@autoreleasepool {
|
||||
return f();
|
||||
}
|
||||
}
|
||||
|
||||
extern const char *macgetresourcepath(void);
|
||||
|
||||
const char *macgetresourcepath(void) {
|
||||
return [[[NSBundle mainBundle] resourcePath] cStringUsingEncoding:NSUTF8StringEncoding];
|
||||
}
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@interface KincApplication : NSApplication {
|
||||
}
|
||||
@ -95,17 +91,11 @@ bool kinc_internal_handle_messages(void) {
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
void swapBuffersMac(int windowId) {
|
||||
#ifndef KINC_METAL
|
||||
[windows[windowId].view switchBuffers];
|
||||
#endif
|
||||
}
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
static int createWindow(kinc_window_options_t *options) {
|
||||
int width = options->width / [[NSScreen mainScreen] backingScaleFactor];
|
||||
|
||||
Reference in New Issue
Block a user