=> 20f118801d8b18b0dd77ae35c8049ca5d6d9ad44
[1mdiff --git a/src/macos.m b/src/macos.m[m [1mindex 6bec3c12..d588fa4a 100644[m [1m--- a/src/macos.m[m [1m+++ b/src/macos.m[m [36m@@ -60,6 +60,7 @@[m [mstatic NSString *currentSystemAppearance_(void) {[m }[m [m iBool shouldDefaultToMetalRenderer_MacOS(void) {[m [32m+[m[32m /* TODO: Test if SDL 2.0.16 works better (no stutters with Metal?). */[m return iFalse; /*[m const iInt2 ver = macVer_();[m return ver.x > 10 || ver.y > 13;*/[m [1mdiff --git a/src/ui/labelwidget.c b/src/ui/labelwidget.c[m [1mindex d6cc31cb..edc36a49 100644[m [1m--- a/src/ui/labelwidget.c[m [1m+++ b/src/ui/labelwidget.c[m [36m@@ -300,14 +300,15 @@[m [mstatic void draw_LabelWidget_(const iLabelWidget *d) {[m bottomLeft_Rect(frameRect),[m topLeft_Rect(frameRect),[m topRight_Rect(frameRect),[m [31m-#if SDL_VERSION_ATLEAST(2, 0, 16) && defined (iPlatformApple)[m [31m- /* A very curious regression in SDL 2.0.16 on macOS. */[m [31m- addX_I2(bottomRight_Rect(frameRect), -1),[m [31m-#else[m bottomRight_Rect(frameRect),[m [31m-#endif[m bottomLeft_Rect(frameRect)[m };[m [32m+[m[32m#if SDL_VERSION_ATLEAST(2, 0, 16)[m [32m+[m[32m if (isOpenGLRenderer_Window()) {[m [32m+[m[32m /* A very curious regression in SDL 2.0.16. */[m [32m+[m[32m points[3].x--;[m[41m [m [32m+[m[32m }[m [32m+[m[32m#endif[m drawLines_Paint(&p, points + 2, 3, frame2);[m drawLines_Paint([m &p, points, !isHover && flags & d->flags.noTopFrame ? 2 : 3, frame);[m [1mdiff --git a/src/ui/paint.c b/src/ui/paint.c[m [1mindex 869238d5..79adb7d1 100644[m [1m--- a/src/ui/paint.c[m [1m+++ b/src/ui/paint.c[m [36m@@ -89,17 +89,19 @@[m [mvoid drawRect_Paint(const iPaint *d, iRect rect, int color) {[m /* Keep the right/bottom edge visible in the window. */[m if (br.x == d->dst->size.x) br.x--;[m if (br.y == d->dst->size.y) br.y--;[m [31m- const SDL_Point edges[] = {[m [32m+[m[32m SDL_Point edges[] = {[m { left_Rect(rect), top_Rect(rect) },[m { br.x, top_Rect(rect) },[m { br.x, br.y },[m [31m-#if SDL_VERSION_ATLEAST(2, 0, 16) && defined (iPlatformApple)[m [31m- { left_Rect(rect), br.y - 1 }, /* regression in SDL 2.0.16? */[m [31m-#else[m { left_Rect(rect), br.y },[m [31m-#endif[m { left_Rect(rect), top_Rect(rect) }[m };[m [32m+[m[32m#if SDL_VERSION_ATLEAST(2, 0, 16)[m [32m+[m[32m if (isOpenGLRenderer_Window()) {[m [32m+[m[32m /* A very curious regression in SDL 2.0.16. */[m [32m+[m[32m edges[3].y--;[m [32m+[m[32m }[m [32m+[m[32m#endif[m setColor_Paint_(d, color);[m SDL_RenderDrawLines(renderer_Paint_(d), edges, iElemCount(edges));[m }[m [1mdiff --git a/src/ui/window.c b/src/ui/window.c[m [1mindex 6b8abb4d..86d22b1c 100644[m [1m--- a/src/ui/window.c[m [1m+++ b/src/ui/window.c[m [36m@@ -65,6 +65,8 @@[m [mstatic float initialUiScale_ = 1.0f;[m static float initialUiScale_ = 1.1f;[m #endif[m [m [32m+[m[32mstatic iBool isOpenGLRenderer_;[m [32m+[m iDefineTypeConstructionArgs(Window, (iRect rect), rect)[m [m /* TODO: Define menus per platform. */[m [36m@@ -446,6 +448,7 @@[m [mvoid init_Window(iWindow *d, iRect rect) {[m /* Some info. */ {[m SDL_RendererInfo info;[m SDL_GetRendererInfo(d->render, &info);[m [32m+[m[32m isOpenGLRenderer_ = !iCmpStr(info.name, "opengl");[m printf("[window] renderer: %s%s\n", info.name,[m info.flags & SDL_RENDERER_ACCELERATED ? " (accelerated)" : "");[m #if !defined (NDEBUG)[m [36m@@ -1187,6 +1190,10 @@[m [miWindow *get_Window(void) {[m return theWindow_;[m }[m [m [32m+[m[32miBool isOpenGLRenderer_Window(void) {[m [32m+[m[32m return isOpenGLRenderer_;[m [32m+[m[32m}[m [32m+[m void setKeyboardHeight_Window(iWindow *d, int height) {[m if (d->keyboardHeight != height) {[m d->keyboardHeight = height;[m [1mdiff --git a/src/ui/window.h b/src/ui/window.h[m [1mindex bb98dbe9..63f7e5f2 100644[m [1m--- a/src/ui/window.h[m [1m+++ b/src/ui/window.h[m [36m@@ -137,6 +137,8 @@[m [miRoot * findRoot_Window (const iWindow *, const iWidget *widget);[m iRoot * otherRoot_Window (const iWindow *, iRoot *root);[m iWindow * get_Window (void);[m [m [32m+[m[32miBool isOpenGLRenderer_Window (void);[m [32m+[m #if defined (LAGRANGE_ENABLE_CUSTOM_FRAME)[m SDL_HitTestResult hitTest_Window(const iWindow *d, iInt2 pos);[m #endif[m
text/gemini; charset=utf-8
This content has been proxied by September (ba2dc).