Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
bcd99f5c
Commit
bcd99f5c
authored
Jun 01, 2017
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineandroid: Wait until we receive the desktop size before proceeding with startup.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4123bbdd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
1 deletion
+46
-1
WineActivity.java
dlls/wineandroid.drv/WineActivity.java
+2
-1
window.c
dlls/wineandroid.drv/window.c
+41
-0
wineandroid.drv.spec
dlls/wineandroid.drv/wineandroid.drv.spec
+3
-0
No files found.
dlls/wineandroid.drv/WineActivity.java
View file @
bcd99f5c
...
...
@@ -70,7 +70,6 @@ public class WineActivity extends Activity
Locale
.
getDefault
().
getCountry
()
+
".UTF-8"
;
copyAssetFiles
();
runOnUiThread
(
new
Runnable
()
{
public
void
run
()
{
progress_dialog
.
dismiss
();
}});
HashMap
<
String
,
String
>
env
=
new
HashMap
<
String
,
String
>();
env
.
put
(
"WINELOADER"
,
loader
.
toString
()
);
...
...
@@ -96,6 +95,8 @@ public class WineActivity extends Activity
log
.
delete
();
}
createProgressDialog
(
0
,
"Setting up the Windows environment..."
);
System
.
load
(
libdir
.
toString
()
+
"/libwine.so"
);
prefix
.
mkdirs
();
...
...
dlls/wineandroid.drv/window.c
View file @
bcd99f5c
...
...
@@ -282,6 +282,28 @@ static int process_events( DWORD mask )
/***********************************************************************
* wait_events
*/
static
int
wait_events
(
int
timeout
)
{
assert
(
GetCurrentThreadId
()
==
desktop_tid
);
for
(;;)
{
struct
pollfd
pollfd
;
int
ret
;
pollfd
.
fd
=
event_pipe
[
0
];
pollfd
.
events
=
POLLIN
|
POLLHUP
;
ret
=
poll
(
&
pollfd
,
1
,
timeout
);
if
(
ret
==
-
1
&&
errno
==
EINTR
)
continue
;
if
(
ret
&&
(
pollfd
.
revents
&
(
POLLHUP
|
POLLERR
)))
ret
=
-
1
;
return
ret
;
}
}
/***********************************************************************
* ANDROID_MsgWaitForMultipleObjectsEx
*/
DWORD
CDECL
ANDROID_MsgWaitForMultipleObjectsEx
(
DWORD
count
,
const
HANDLE
*
handles
,
...
...
@@ -411,3 +433,22 @@ void CDECL ANDROID_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flag
TRACE
(
"win %p window %s client %s style %08x flags %08x
\n
"
,
hwnd
,
wine_dbgstr_rect
(
window_rect
),
wine_dbgstr_rect
(
client_rect
),
new_style
,
swp_flags
);
}
/***********************************************************************
* ANDROID_create_desktop
*/
BOOL
CDECL
ANDROID_create_desktop
(
UINT
width
,
UINT
height
)
{
/* wait until we receive the surface changed event */
while
(
!
screen_width
)
{
if
(
wait_events
(
2000
)
!=
1
)
{
ERR
(
"wait timed out
\n
"
);
break
;
}
process_events
(
QS_ALLINPUT
);
}
return
TRUE
;
}
dlls/wineandroid.drv/wineandroid.drv.spec
View file @
bcd99f5c
...
...
@@ -11,3 +11,6 @@
@ cdecl MsgWaitForMultipleObjectsEx(long ptr long long long) ANDROID_MsgWaitForMultipleObjectsEx
@ cdecl WindowPosChanging(long long long ptr ptr ptr ptr) ANDROID_WindowPosChanging
@ cdecl WindowPosChanged(long long long ptr ptr ptr ptr ptr) ANDROID_WindowPosChanged
# Desktop
@ cdecl wine_create_desktop(long long) ANDROID_create_desktop
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment