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
6396f9f5
Commit
6396f9f5
authored
Jun 06, 2017
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineandroid: Load the gralloc module in all processes.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
fe6367ae
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
0 deletions
+29
-0
android.h
dlls/wineandroid.drv/android.h
+2
-0
init.c
dlls/wineandroid.drv/init.c
+27
-0
No files found.
dlls/wineandroid.drv/android.h
View file @
6396f9f5
...
...
@@ -107,4 +107,6 @@ int send_event( const union event_data *data );
extern
JavaVM
*
wine_get_java_vm
(
void
);
extern
jobject
wine_get_java_object
(
void
);
extern
struct
gralloc_module_t
*
gralloc_module
;
#endif
/* __WINE_ANDROID_H */
dlls/wineandroid.drv/init.c
View file @
6396f9f5
...
...
@@ -402,6 +402,31 @@ static const JNINativeMethod methods[] =
DECL_FUNCPTR
(
__android_log_print
);
DECL_FUNCPTR
(
ANativeWindow_fromSurface
);
DECL_FUNCPTR
(
ANativeWindow_release
);
DECL_FUNCPTR
(
hw_get_module
);
struct
gralloc_module_t
*
gralloc_module
=
NULL
;
static
void
load_hardware_libs
(
void
)
{
const
struct
hw_module_t
*
module
;
void
*
libhardware
;
char
error
[
256
];
if
((
libhardware
=
wine_dlopen
(
"libhardware.so"
,
RTLD_GLOBAL
,
error
,
sizeof
(
error
)
)))
{
LOAD_FUNCPTR
(
libhardware
,
hw_get_module
);
}
else
{
ERR
(
"failed to load libhardware: %s
\n
"
,
error
);
return
;
}
if
(
phw_get_module
(
GRALLOC_HARDWARE_MODULE_ID
,
&
module
)
==
0
)
gralloc_module
=
(
struct
gralloc_module_t
*
)
module
;
else
ERR
(
"failed to load gralloc module
\n
"
);
}
static
void
load_android_libs
(
void
)
{
...
...
@@ -433,6 +458,8 @@ static BOOL process_attach(void)
JNIEnv
*
jni_env
;
JavaVM
*
java_vm
;
load_hardware_libs
();
if
((
java_vm
=
wine_get_java_vm
()))
/* running under Java */
{
#ifdef __i386__
...
...
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