20 lines
499 B
Objective-C
20 lines
499 B
Objective-C
#import <Foundation/Foundation.h>
|
|
#include "lua.h"
|
|
|
|
void set_macos_bundle_resources(lua_State *L)
|
|
{ @autoreleasepool
|
|
{
|
|
NSString* resource_path = [[NSBundle mainBundle] resourcePath];
|
|
lua_pushstring(L, [resource_path UTF8String]);
|
|
lua_setglobal(L, "MACOS_RESOURCES");
|
|
}}
|
|
|
|
|
|
/* Thanks to mathewmariani, taken from his lite-macos github repository. */
|
|
void enable_momentum_scroll() {
|
|
[[NSUserDefaults standardUserDefaults]
|
|
setBool: YES
|
|
forKey: @"AppleMomentumScrollSupported"];
|
|
}
|
|
|