程式語言 - Wine - Scale 2X



wine-10.0

diff --git a/dlls/win32u/dce.c b/dlls/win32u/dce.c
index d9c5f161385..fd4494d9e94 100644
--- a/dlls/win32u/dce.c
+++ b/dlls/win32u/dce.c
@@ -277,6 +277,7 @@ void create_window_surface( HWND hwnd, BOOL create_layered, const RECT *surface_
     RECT monitor_rect;
 
 
+    monitor_dpi *= 2;
     monitor_rect = get_surface_rect( map_dpi_rect( *surface_rect, dpi, monitor_dpi ) );
     if ((driver_surface = get_driver_window_surface( *window_surface, monitor_dpi )))
     {
diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c
index 428dcb7b8b7..d5128869ebf 100644
--- a/dlls/winex11.drv/event.c
+++ b/dlls/winex11.drv/event.c
@@ -1105,6 +1105,12 @@ static BOOL X11DRV_ConfigureNotify( HWND hwnd, XEvent *xev )
     else if (is_virtual_desktop()) FIXME( "synthetic event mapping not implemented\n" );
 
     pos = root_to_virtual_screen( pos.x, pos.y );
+
+    pos.x /= 2;
+    pos.y /= 2;
+    size.cx /= 2;
+    size.cy /= 2;
+
     if (size.cx == 1 && size.cy == 1 && IsRectEmpty( &data->rects.window )) size.cx = size.cy = 0;
     SetRect( &rect, pos.x, pos.y, pos.x + size.cx, pos.y + size.cy );
     window_configure_notify( data, event->serial, &rect );
diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c
index 9d25b71c992..7f31da3774e 100644
--- a/dlls/winex11.drv/mouse.c
+++ b/dlls/winex11.drv/mouse.c
@@ -511,13 +511,13 @@ static void map_event_coords( HWND hwnd, Window window, Window event_root, int x
     {
         if (window == data->client_window)
         {
-            pt.x += data->rects.client.left;
-            pt.y += data->rects.client.top;
+            pt.x = pt.x / 2 + data->rects.client.left;
+            pt.y = pt.y / 2 + data->rects.client.top;
         }
         else
         {
-            pt.x += data->rects.visible.left;
-            pt.y += data->rects.visible.top;
+            pt.x = pt.x / 2 + data->rects.visible.left;
+            pt.y = pt.y / 2 + data->rects.visible.top;
         }
         release_win_data( data );
     }
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c
index 32c3800abfe..ad463b6c4a1 100644
--- a/dlls/winex11.drv/window.c
+++ b/dlls/winex11.drv/window.c
@@ -877,8 +877,8 @@ static void set_size_hints( struct x11drv_win_data *data, DWORD style )
 
         if (!is_window_resizable( data, style ))
         {
-            size_hints->max_width = data->rects.visible.right - data->rects.visible.left;
-            size_hints->max_height = data->rects.visible.bottom - data->rects.visible.top;
+            size_hints->max_width = (data->rects.visible.right - data->rects.visible.left) * 2;
+            size_hints->max_height = (data->rects.visible.bottom - data->rects.visible.top) * 2;
             if (size_hints->max_width <= 0 ||size_hints->max_height <= 0)
                 size_hints->max_width = size_hints->max_height = 1;
             size_hints->min_width = size_hints->max_width;
@@ -1310,8 +1310,8 @@ static void window_set_config( struct x11drv_win_data *data, const RECT *new_rec
          old_rect->bottom - old_rect->top != new_rect->bottom - new_rect->top) &&
         (!(style & WS_MAXIMIZE) || !data->managed))
     {
-        changes.width = new_rect->right - new_rect->left;
-        changes.height = new_rect->bottom - new_rect->top;
+        changes.width = (new_rect->right - new_rect->left) * 2;
+        changes.height = (new_rect->bottom - new_rect->top) * 2;
         /* if window rect is empty force size to 1x1 */
         if (changes.width <= 0 || changes.height <= 0) changes.width = changes.height = 1;
         if (changes.width > 65535) changes.width = 65535;
@@ -1324,8 +1324,8 @@ static void window_set_config( struct x11drv_win_data *data, const RECT *new_rec
         (data->whole_window != root_window && !data->embedded))
     {
         POINT pt = virtual_screen_to_root( new_rect->left, new_rect->top );
-        changes.x = pt.x;
-        changes.y = pt.y;
+        changes.x = pt.x * 2;
+        changes.y = pt.y * 2;
         mask |= CWX | CWY;
     }
 
@@ -2120,8 +2120,8 @@ static void create_whole_window( struct x11drv_win_data *data )
     else if (cy > 65535) cy = 65535;
 
     pos = virtual_screen_to_root( data->rects.visible.left, data->rects.visible.top );
-    data->whole_window = XCreateWindow( data->display, root_window, pos.x, pos.y,
-                                        cx, cy, 0, data->vis.depth, InputOutput,
+    data->whole_window = XCreateWindow( data->display, root_window, pos.x * 2, pos.y * 2,
+                                        cx * 2, cy * 2, 0, data->vis.depth, InputOutput,
                                         data->vis.visual, mask, &attr );
     if (!data->whole_window) goto done;
     SetRect( &data->current_state.rect, pos.x, pos.y, pos.x + cx, pos.y + cy );
diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c
index ef6bd16267c..5352a7f118a 100644
--- a/tools/winebuild/spec32.c
+++ b/tools/winebuild/spec32.c
@@ -762,7 +762,11 @@ void output_module( DLLSPEC *spec )
         break;
     default:
         output( "\n\t.section \".init\",\"ax\"\n" );
+#if defined(__aarch64__)
+        output( "\tb 1f\n" );
+#else
         output( "\tjmp 1f\n" );
+#endif
         output( "__wine_spec_pe_header:\n" );
         output( "\t.skip %u\n", 65536 + page_size );
         output( "1:\n" );