summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-09-02 16:13:43 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-09-02 16:13:43 +0300
commit77ca5271345e02fc6c4b0ede4621893b5dd523b9 (patch)
tree1c6193180561f59c4905660ad8a0dad25943bdef /src
parent0305d3ca180713c4bca433c30fbabbe19906d930 (diff)
Window: Working on adding an option for software rendering
Diffstat (limited to 'src')
-rw-r--r--src/ui/window.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/ui/window.c b/src/ui/window.c
index 650bc9ee..6f60fbb2 100644
--- a/src/ui/window.c
+++ b/src/ui/window.c
@@ -413,7 +413,7 @@ static void setupUserInterface_Window(iWindow *d) {
413 }, 413 },
414 6); 414 6);
415 setId_Widget(tabsMenu, "doctabs.menu"); 415 setId_Widget(tabsMenu, "doctabs.menu");
416 /* Glboal keyboard shortcuts. */ { 416 /* Global keyboard shortcuts. */ {
417 addAction_Widget(d->root, SDLK_LEFTBRACKET, KMOD_SHIFT | KMOD_PRIMARY, "tabs.prev"); 417 addAction_Widget(d->root, SDLK_LEFTBRACKET, KMOD_SHIFT | KMOD_PRIMARY, "tabs.prev");
418 addAction_Widget(d->root, SDLK_RIGHTBRACKET, KMOD_SHIFT | KMOD_PRIMARY, "tabs.next"); 418 addAction_Widget(d->root, SDLK_RIGHTBRACKET, KMOD_SHIFT | KMOD_PRIMARY, "tabs.next");
419 addAction_Widget(d->root, 'l', KMOD_PRIMARY, "focus.set id:url"); 419 addAction_Widget(d->root, 'l', KMOD_PRIMARY, "focus.set id:url");
@@ -446,13 +446,17 @@ static void drawBlank_Window_(iWindow *d) {
446 SDL_RenderPresent(d->render); 446 SDL_RenderPresent(d->render);
447} 447}
448 448
449// #define ENABLE_SWRENDER
450
449void init_Window(iWindow *d, iRect rect) { 451void init_Window(iWindow *d, iRect rect) {
450 theWindow_ = d; 452 theWindow_ = d;
451 iZap(d->cursors); 453 iZap(d->cursors);
452 d->pendingCursor = NULL; 454 d->pendingCursor = NULL;
453 d->isDrawFrozen = iTrue; 455 d->isDrawFrozen = iTrue;
454 uint32_t flags = SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI; 456 uint32_t flags = SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI;
455#if defined (iPlatformApple) 457#if defined (ENABLE_SWRENDER)
458 SDL_SetHint(SDL_HINT_RENDER_DRIVER, "software");
459#elif defined (iPlatformApple)
456 SDL_SetHint(SDL_HINT_RENDER_DRIVER, "metal"); 460 SDL_SetHint(SDL_HINT_RENDER_DRIVER, "metal");
457#else 461#else
458 flags |= SDL_WINDOW_OPENGL; 462 flags |= SDL_WINDOW_OPENGL;