blob: 2ba10da769ef8ac8af14b3dbb12e9834827907c5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#import <Foundation/Foundation.h>
#include "lua.h"
#ifdef MACOS_USE_BUNDLE
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");
}}
#endif
/* Thanks to mathewmariani, taken from his lite-macos github repository. */
void enable_momentum_scroll() {
[[NSUserDefaults standardUserDefaults]
setBool: YES
forKey: @"AppleMomentumScrollSupported"];
}
|