[PATCH 05/11] wineandroid: Move wine_create_desktop_to dllmain.c.
Jacek Caban
wine at gitlab.winehq.org
Mon Jun 6 19:33:04 CDT 2022
From: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
---
dlls/wineandroid.drv/android.h | 4 ++++
dlls/wineandroid.drv/dllmain.c | 9 +++++++++
dlls/wineandroid.drv/init.c | 1 +
dlls/wineandroid.drv/unixlib.h | 1 +
dlls/wineandroid.drv/window.c | 6 +++---
dlls/wineandroid.drv/wineandroid.drv.spec | 2 +-
6 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/dlls/wineandroid.drv/android.h b/dlls/wineandroid.drv/android.h
index 8b62bec862d..2a09d4195ef 100644
--- a/dlls/wineandroid.drv/android.h
+++ b/dlls/wineandroid.drv/android.h
@@ -112,6 +112,10 @@ extern void ANDROID_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_fla
const RECT *visible_rect, const RECT *valid_rects,
struct window_surface *surface ) DECLSPEC_HIDDEN;
+/* unixlib interface */
+
+extern NTSTATUS android_create_desktop( void *arg ) DECLSPEC_HIDDEN;
+
extern unsigned int screen_width DECLSPEC_HIDDEN;
extern unsigned int screen_height DECLSPEC_HIDDEN;
extern RECT virtual_screen_rect DECLSPEC_HIDDEN;
diff --git a/dlls/wineandroid.drv/dllmain.c b/dlls/wineandroid.drv/dllmain.c
index 7886efe4b58..42719798f33 100644
--- a/dlls/wineandroid.drv/dllmain.c
+++ b/dlls/wineandroid.drv/dllmain.c
@@ -34,3 +34,12 @@ BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved )
DisableThreadLibraryCalls( inst );
return !ANDROID_CALL(init, NULL);
}
+
+
+/***********************************************************************
+ * wine_create_desktop (wineandroid.@)
+ */
+BOOL CDECL wine_create_desktop( UINT width, UINT height )
+{
+ return ANDROID_CALL( create_desktop, NULL );
+}
diff --git a/dlls/wineandroid.drv/init.c b/dlls/wineandroid.drv/init.c
index c0b3332df30..b7ee7d8a9b8 100644
--- a/dlls/wineandroid.drv/init.c
+++ b/dlls/wineandroid.drv/init.c
@@ -603,6 +603,7 @@ static HRESULT android_init( void *arg )
const unixlib_entry_t __wine_unix_call_funcs[] =
{
+ android_create_desktop,
android_init,
};
diff --git a/dlls/wineandroid.drv/unixlib.h b/dlls/wineandroid.drv/unixlib.h
index d8327b30f08..10fe401dea0 100644
--- a/dlls/wineandroid.drv/unixlib.h
+++ b/dlls/wineandroid.drv/unixlib.h
@@ -21,6 +21,7 @@
enum android_funcs
{
+ unix_create_desktop,
unix_init,
unix_funcs_count
};
diff --git a/dlls/wineandroid.drv/window.c b/dlls/wineandroid.drv/window.c
index 53c270eb7f3..d5e6a6961a9 100644
--- a/dlls/wineandroid.drv/window.c
+++ b/dlls/wineandroid.drv/window.c
@@ -1668,9 +1668,9 @@ LRESULT ANDROID_WindowMessage( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
/***********************************************************************
- * ANDROID_create_desktop
+ * android_create_desktop
*/
-BOOL CDECL ANDROID_create_desktop( UINT width, UINT height )
+NTSTATUS android_create_desktop( void *arg )
{
/* wait until we receive the surface changed event */
while (!screen_width)
@@ -1682,5 +1682,5 @@ BOOL CDECL ANDROID_create_desktop( UINT width, UINT height )
}
process_events( QS_ALLINPUT );
}
- return TRUE;
+ return 0;
}
diff --git a/dlls/wineandroid.drv/wineandroid.drv.spec b/dlls/wineandroid.drv/wineandroid.drv.spec
index 400f5ccb991..22b97356521 100644
--- a/dlls/wineandroid.drv/wineandroid.drv.spec
+++ b/dlls/wineandroid.drv/wineandroid.drv.spec
@@ -1,2 +1,2 @@
# Desktop
-@ cdecl wine_create_desktop(long long) ANDROID_create_desktop
+@ cdecl wine_create_desktop(long long)
--
GitLab
https://gitlab.winehq.org/wine/wine/-/merge_requests/193
More information about the wine-devel
mailing list