mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-08-14 05:54:00 +02:00
Smooth scrolling in the SDL port on macOS
This commit is contained in:
11
SDL/main.c
11
SDL/main.c
@@ -682,10 +682,21 @@ static bool get_arg_flag(const char *flag, int *argc, char **argv)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
#include <CoreFoundation/CoreFoundation.h>
|
||||||
|
static void enable_smooth_scrolling(void)
|
||||||
|
{
|
||||||
|
CFPreferencesSetAppValue(CFSTR("AppleMomentumScrollSupported"), kCFBooleanTrue, kCFPreferencesCurrentApplication);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
SetProcessDPIAware();
|
SetProcessDPIAware();
|
||||||
|
#endif
|
||||||
|
#ifdef __APPLE__
|
||||||
|
enable_smooth_scrolling();
|
||||||
#endif
|
#endif
|
||||||
fprintf(stderr, "SameBoy v" GB_VERSION "\n");
|
fprintf(stderr, "SameBoy v" GB_VERSION "\n");
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user