在 2026-7-6 05:48, Pali Rohár 写道:
Hello, in the attachment I'm sending changes for mingw-w64 scrnsave library.

Changes are fixing entrypoint for UNICODE version of library
(libscrnsavw.a), disabling win9x compatibility code for non-i386 builds
and fixing win9x compatibility code to really work on win9x and winnt.

With those changes the WinSDK sample fractal.c screensaver can be linked
with mingw-w64 scrnsave library.

Does it make sense to apply this change on top of it:

diff --git a/mingw-w64-crt/libsrc/scrnsave.c b/mingw-w64-crt/libsrc/scrnsave.c
index 80a483b23..5af6ccac4 100644
--- a/mingw-w64-crt/libsrc/scrnsave.c
+++ b/mingw-w64-crt/libsrc/scrnsave.c
@@ -238,16 +238,14 @@ static int LaunchScreenSaver(HWND hParent)
       hdc = GetDC(NULL);
       GetClipBox(hdc, &rc);
       ReleaseDC(NULL, hdc);
-      rc.right -= rc.left;
-      rc.bottom -= rc.top;
       style |= WS_VISIBLE;
     }

   /* create main screen saver window */
   hMainWindow = CreateWindowEx(hParent ? 0 : WS_EX_TOPMOST, CLASS_SCRNSAVE,
                                TEXT("SCREENSAVER"), style,
-                               rc.left, rc.top, rc.right, rc.bottom, hParent, 
NULL,
-                               hMainInstance, NULL);
+                               rc.left, rc.top, rc.right - rc.left, rc.bottom 
- rc.top,
+                               hParent, NULL, hMainInstance, NULL);

   /* display window and start pumping messages */
   if (hMainWindow)


Your proposed change stores the width in `right` and height in `bottom`, which contradicts the names of those fields.

`GetClientRect()` sets `left` and `top` to zeros so it happens to work either 
way.


--
Best regards,
LIU Hao

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to