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
5e737175
Commit
5e737175
authored
Jun 06, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 07, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineandroid: Build with msvcrt.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
parent
84bed157
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
51 additions
and
15 deletions
+51
-15
Makefile.in
dlls/wineandroid.drv/Makefile.in
+3
-4
android.h
dlls/wineandroid.drv/android.h
+2
-0
device.c
dlls/wineandroid.drv/device.c
+7
-4
dllmain.c
dlls/wineandroid.drv/dllmain.c
+9
-1
init.c
dlls/wineandroid.drv/init.c
+11
-1
keyboard.c
dlls/wineandroid.drv/keyboard.c
+4
-0
opengl.c
dlls/wineandroid.drv/opengl.c
+4
-0
unixlib.h
dlls/wineandroid.drv/unixlib.h
+2
-1
window.c
dlls/wineandroid.drv/window.c
+9
-4
No files found.
dlls/wineandroid.drv/Makefile.in
View file @
5e737175
EXTRADEFS
=
-DWINE_NO_LONG_TYPES
MODULE
=
wineandroid.drv
IMPORTS
=
user32 ntoskrnl win32u
EXTRALIBS
=
$(PTHREAD_LIBS)
EXTRADLLFLAGS
=
-mcygwin
UNIXLIB
=
wineandroid.so
IMPORTS
=
ntoskrnl
EXTRALIBS
=
-lwin32u
$(PTHREAD_LIBS)
C_SRCS
=
\
device.c
\
...
...
dlls/wineandroid.drv/android.h
View file @
5e737175
...
...
@@ -120,6 +120,8 @@ extern NTSTATUS android_java_init( void *arg ) DECLSPEC_HIDDEN;
extern
NTSTATUS
android_java_uninit
(
void
*
arg
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
android_register_window
(
void
*
arg
)
DECLSPEC_HIDDEN
;
extern
PNTAPCFUNC
register_window_callback
;
extern
NTSTATUS
(
WINAPI
*
pNtWaitForMultipleObjects
)(
ULONG
,
const
HANDLE
*
,
BOOLEAN
,
BOOLEAN
,
const
LARGE_INTEGER
*
)
DECLSPEC_HIDDEN
;
extern
unsigned
int
screen_width
DECLSPEC_HIDDEN
;
extern
unsigned
int
screen_height
DECLSPEC_HIDDEN
;
...
...
dlls/wineandroid.drv/device.c
View file @
5e737175
...
...
@@ -18,6 +18,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#if 0
#pragma makedep unix
#endif
#include "config.h"
#include <assert.h>
...
...
@@ -1174,10 +1178,9 @@ NTSTATUS android_java_uninit( void *arg )
void
start_android_device
(
void
)
{
/* FIXME: use KeUserModeCallback instead */
NTSTATUS
(
WINAPI
*
func
)(
void
*
,
ULONG
)
=
((
void
**
)
NtCurrentTeb
()
->
Peb
->
KernelCallbackTable
)[
client_start_device
];
func
(
NULL
,
0
);
void
*
ret_ptr
;
ULONG
ret_len
;
thread
=
ULongToHandle
(
KeUserModeCallback
(
client_start_device
,
NULL
,
0
,
&
ret_ptr
,
&
ret_len
));
}
...
...
dlls/wineandroid.drv/dllmain.c
View file @
5e737175
...
...
@@ -32,6 +32,9 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
android
);
static
unixlib_handle_t
unix_handle
;
static
NTSTATUS
(
CDECL
*
unix_call
)(
enum
android_funcs
code
,
void
*
params
);
extern
NTSTATUS
CDECL
wine_ntoskrnl_main_loop
(
HANDLE
stop_event
);
static
HANDLE
stop_event
;
static
HANDLE
thread
;
...
...
@@ -122,13 +125,18 @@ BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved )
if
(
reason
==
DLL_PROCESS_ATTACH
)
return
TRUE
;
DisableThreadLibraryCalls
(
inst
);
if
(
NtQueryVirtualMemory
(
GetCurrentProcess
(),
inst
,
MemoryWineUnixFuncs
,
&
unix_handle
,
sizeof
(
unix_handle
),
NULL
))
return
FALSE
;
params
.
register_window_callback
=
register_window_callback
;
if
(
ANDROID_CALL
(
init
,
&
params
))
return
FALSE
;
params
.
pNtWaitForMultipleObjects
=
NtWaitForMultipleObjects
;
if
(
__wine_unix_call
(
unix_handle
,
unix_init
,
&
params
))
return
FALSE
;
callback_table
=
NtCurrentTeb
()
->
Peb
->
KernelCallbackTable
;
callback_table
[
client_start_device
]
=
android_start_device
;
unix_call
=
params
.
unix_call
;
return
TRUE
;
}
...
...
dlls/wineandroid.drv/init.c
View file @
5e737175
...
...
@@ -18,6 +18,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#if 0
#pragma makedep unix
#endif
#define NONAMELESSSTRUCT
#define NONAMELESSUNION
#include "config.h"
...
...
@@ -558,6 +562,10 @@ JavaVM **p_java_vm = NULL;
jobject
*
p_java_object
=
NULL
;
unsigned
short
*
p_java_gdt_sel
=
NULL
;
static
NTSTATUS
CDECL
unix_call
(
enum
android_funcs
code
,
void
*
params
);
NTSTATUS
(
WINAPI
*
pNtWaitForMultipleObjects
)(
ULONG
,
const
HANDLE
*
,
BOOLEAN
,
BOOLEAN
,
const
LARGE_INTEGER
*
);
static
HRESULT
android_init
(
void
*
arg
)
{
struct
init_params
*
params
=
arg
;
...
...
@@ -603,6 +611,8 @@ static HRESULT android_init( void *arg )
#endif
}
__wine_set_user_driver
(
&
android_drv_funcs
,
WINE_GDI_DRIVER_VERSION
);
pNtWaitForMultipleObjects
=
params
->
pNtWaitForMultipleObjects
;
params
->
unix_call
=
unix_call
;
return
STATUS_SUCCESS
;
}
...
...
@@ -621,7 +631,7 @@ C_ASSERT( ARRAYSIZE(__wine_unix_call_funcs) == unix_funcs_count );
/* FIXME: Use __wine_unix_call instead */
NTSTATUS
unix_call
(
enum
android_funcs
code
,
void
*
params
)
static
NTSTATUS
CDECL
unix_call
(
enum
android_funcs
code
,
void
*
params
)
{
return
__wine_unix_call_funcs
[
code
](
params
);
}
dlls/wineandroid.drv/keyboard.c
View file @
5e737175
...
...
@@ -26,6 +26,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#if 0
#pragma makedep unix
#endif
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
...
...
dlls/wineandroid.drv/opengl.c
View file @
5e737175
...
...
@@ -24,6 +24,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#if 0
#pragma makedep unix
#endif
#include "config.h"
#include <assert.h>
...
...
dlls/wineandroid.drv/unixlib.h
View file @
5e737175
...
...
@@ -31,13 +31,14 @@ enum android_funcs
};
/* FIXME: Use __wine_unix_call when the rest of the stack is ready */
extern
NTSTATUS
unix_call
(
enum
android_funcs
func
,
void
*
arg
)
DECLSPEC_HIDDEN
;
#define ANDROID_CALL(func, params) unix_call( unix_ ## func, params )
/* android_init params */
struct
init_params
{
PNTAPCFUNC
register_window_callback
;
NTSTATUS
(
WINAPI
*
pNtWaitForMultipleObjects
)(
ULONG
,
const
HANDLE
*
,
BOOLEAN
,
BOOLEAN
,
const
LARGE_INTEGER
*
);
NTSTATUS
(
CDECL
*
unix_call
)(
enum
android_funcs
code
,
void
*
params
);
};
...
...
dlls/wineandroid.drv/window.c
View file @
5e737175
...
...
@@ -20,6 +20,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#if 0
#pragma makedep unix
#endif
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
...
...
@@ -1164,14 +1168,15 @@ static const struct
static
int
get_cursor_system_id
(
const
ICONINFOEXW
*
info
)
{
const
struct
system_cursors
*
cursors
;
const
WCHAR
*
module
;
unsigned
int
i
;
HMODULE
module
;
if
(
info
->
szResName
[
0
])
return
0
;
/* only integer resources are supported here */
if
(
!
(
module
=
GetModuleHandleW
(
info
->
szModName
)))
return
0
;
if
((
module
=
wcsrchr
(
info
->
szModName
,
'\\'
)))
module
++
;
else
module
=
info
->
szModName
;
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
module_cursors
);
i
++
)
if
(
GetModuleHandleW
(
module_cursors
[
i
].
name
)
==
module
)
break
;
if
(
!
wcsicmp
(
module
,
module_cursors
[
i
].
name
)
)
break
;
if
(
i
==
ARRAY_SIZE
(
module_cursors
))
return
0
;
cursors
=
module_cursors
[
i
].
cursors
;
...
...
@@ -1207,7 +1212,7 @@ NTSTATUS ANDROID_MsgWaitForMultipleObjectsEx( DWORD count, const HANDLE *handles
if
(
current_event
)
mask
=
0
;
if
(
process_events
(
mask
))
return
count
-
1
;
}
return
NtWaitForMultipleObjects
(
count
,
handles
,
!
(
flags
&
MWMO_WAITALL
),
return
p
NtWaitForMultipleObjects
(
count
,
handles
,
!
(
flags
&
MWMO_WAITALL
),
!!
(
flags
&
MWMO_ALERTABLE
),
timeout
);
}
...
...
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