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
57d5cf03
Commit
57d5cf03
authored
Apr 06, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineandroid: Use standard dlopen() instead of the libwine wrappers.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7cb1ac7b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
25 deletions
+18
-25
init.c
dlls/wineandroid.drv/init.c
+8
-11
mmdevdrv.c
dlls/wineandroid.drv/mmdevdrv.c
+3
-5
opengl.c
dlls/wineandroid.drv/opengl.c
+7
-9
No files found.
dlls/wineandroid.drv/init.c
View file @
57d5cf03
...
...
@@ -32,7 +32,6 @@
#include "winreg.h"
#include "android.h"
#include "wine/server.h"
#include "wine/library.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
android
);
...
...
@@ -444,7 +443,7 @@ static const JNINativeMethod methods[] =
#define DECL_FUNCPTR(f) typeof(f) * p##f = NULL
#define LOAD_FUNCPTR(lib, func) do { \
if ((p##func =
wine_dlsym( lib, #func, NULL, 0
)) == NULL) \
if ((p##func =
dlsym( lib, #func
)) == NULL) \
{ ERR( "can't find symbol %s\n", #func); return; } \
} while(0)
...
...
@@ -567,9 +566,8 @@ static void load_hardware_libs(void)
const
struct
hw_module_t
*
module
;
int
ret
;
void
*
libhardware
;
char
error
[
256
];
if
((
libhardware
=
wine_dlopen
(
"libhardware.so"
,
RTLD_GLOBAL
,
error
,
sizeof
(
error
)
)))
if
((
libhardware
=
dlopen
(
"libhardware.so"
,
RTLD_GLOBAL
)))
{
LOAD_FUNCPTR
(
libhardware
,
hw_get_module
);
}
...
...
@@ -578,9 +576,9 @@ static void load_hardware_libs(void)
/* Android >= N disallows loading libhardware, so we load libandroid (which imports
* libhardware), and then we can find libhardware in the list of loaded libraries.
*/
if
(
!
wine_dlopen
(
"libandroid.so"
,
RTLD_GLOBAL
,
error
,
sizeof
(
error
)
))
if
(
!
dlopen
(
"libandroid.so"
,
RTLD_GLOBAL
))
{
ERR
(
"failed to load libandroid.so: %s
\n
"
,
error
);
ERR
(
"failed to load libandroid.so: %s
\n
"
,
dlerror
()
);
return
;
}
dl_iterate_phdr
(
enum_libs
,
0
);
...
...
@@ -603,16 +601,15 @@ static void load_hardware_libs(void)
static
void
load_android_libs
(
void
)
{
void
*
libandroid
,
*
liblog
;
char
error
[
1024
];
if
(
!
(
libandroid
=
wine_dlopen
(
"libandroid.so"
,
RTLD_GLOBAL
,
error
,
sizeof
(
error
)
)))
if
(
!
(
libandroid
=
dlopen
(
"libandroid.so"
,
RTLD_GLOBAL
)))
{
ERR
(
"failed to load libandroid.so: %s
\n
"
,
error
);
ERR
(
"failed to load libandroid.so: %s
\n
"
,
dlerror
()
);
return
;
}
if
(
!
(
liblog
=
wine_dlopen
(
"liblog.so"
,
RTLD_GLOBAL
,
error
,
sizeof
(
error
)
)))
if
(
!
(
liblog
=
dlopen
(
"liblog.so"
,
RTLD_GLOBAL
)))
{
ERR
(
"failed to load liblog.so: %s
\n
"
,
error
);
ERR
(
"failed to load liblog.so: %s
\n
"
,
dlerror
()
);
return
;
}
LOAD_FUNCPTR
(
liblog
,
__android_log_print
);
...
...
dlls/wineandroid.drv/mmdevdrv.c
View file @
57d5cf03
...
...
@@ -46,7 +46,6 @@
#include "wine/debug.h"
#include "wine/unicode.h"
#include "wine/list.h"
#include "wine/library.h"
#include "ole2.h"
#include "mmdeviceapi.h"
...
...
@@ -237,7 +236,7 @@ static inline SessionMgr *impl_from_IAudioSessionManager2(IAudioSessionManager2
}
#define LOAD_FUNCPTR(lib, func) do { \
if ((p##func =
wine_dlsym( lib, #func, NULL, 0
)) == NULL) \
if ((p##func =
dlsym( lib, #func
)) == NULL) \
{ ERR( "can't find symbol %s\n", #func); return FALSE; } \
} while(0)
...
...
@@ -246,11 +245,10 @@ static INIT_ONCE init_once = INIT_ONCE_STATIC_INIT;
static
BOOL
WINAPI
load_opensles
(
INIT_ONCE
*
once
,
void
*
param
,
void
**
context
)
{
void
*
libopensles
;
char
error
[
1024
];
if
(
!
(
libopensles
=
wine_dlopen
(
"libOpenSLES.so"
,
RTLD_GLOBAL
,
error
,
sizeof
(
error
)
)))
if
(
!
(
libopensles
=
dlopen
(
"libOpenSLES.so"
,
RTLD_GLOBAL
)))
{
ERR
(
"failed to load libOpenSLES.so: %s
\n
"
,
error
);
ERR
(
"failed to load libOpenSLES.so: %s
\n
"
,
dlerror
()
);
return
FALSE
;
}
LOAD_FUNCPTR
(
libopensles
,
slCreateEngine
);
...
...
dlls/wineandroid.drv/opengl.c
View file @
57d5cf03
...
...
@@ -42,7 +42,6 @@
#include "wine/wgl.h"
#undef GLAPIENTRY
#include "wine/wgl_driver.h"
#include "wine/library.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
android
);
...
...
@@ -655,11 +654,11 @@ static void init_extensions(void)
/* load standard functions and extensions exported from the OpenGL library */
#define USE_GL_FUNC(func) if ((ptr =
wine_dlsym( opengl_handle, #func, NULL, 0
))) egl_funcs.gl.p_##func = ptr;
#define USE_GL_FUNC(func) if ((ptr =
dlsym( opengl_handle, #func
))) egl_funcs.gl.p_##func = ptr;
ALL_WGL_FUNCS
#undef USE_GL_FUNC
#define LOAD_FUNCPTR(func) egl_funcs.ext.p_##func =
wine_dlsym( opengl_handle, #func, NULL, 0
)
#define LOAD_FUNCPTR(func) egl_funcs.ext.p_##func =
dlsym( opengl_handle, #func
)
LOAD_FUNCPTR
(
glActiveShaderProgram
);
LOAD_FUNCPTR
(
glActiveTexture
);
LOAD_FUNCPTR
(
glAttachShader
);
...
...
@@ -949,24 +948,23 @@ static BOOL egl_init(void)
static
int
retval
=
-
1
;
EGLConfig
*
configs
;
EGLint
major
,
minor
,
count
,
i
,
pass
;
char
buffer
[
200
];
if
(
retval
!=
-
1
)
return
retval
;
retval
=
0
;
if
(
!
(
egl_handle
=
wine_dlopen
(
SONAME_LIBEGL
,
RTLD_NOW
|
RTLD_GLOBAL
,
buffer
,
sizeof
(
buffer
)
)))
if
(
!
(
egl_handle
=
dlopen
(
SONAME_LIBEGL
,
RTLD_NOW
|
RTLD_GLOBAL
)))
{
ERR
(
"failed to load %s: %s
\n
"
,
SONAME_LIBEGL
,
buffer
);
ERR
(
"failed to load %s: %s
\n
"
,
SONAME_LIBEGL
,
dlerror
()
);
return
FALSE
;
}
if
(
!
(
opengl_handle
=
wine_dlopen
(
SONAME_LIBGLESV2
,
RTLD_NOW
|
RTLD_GLOBAL
,
buffer
,
sizeof
(
buffer
)
)))
if
(
!
(
opengl_handle
=
dlopen
(
SONAME_LIBGLESV2
,
RTLD_NOW
|
RTLD_GLOBAL
)))
{
ERR
(
"failed to load %s: %s
\n
"
,
SONAME_LIBGLESV2
,
buffer
);
ERR
(
"failed to load %s: %s
\n
"
,
SONAME_LIBGLESV2
,
dlerror
()
);
return
FALSE
;
}
#define LOAD_FUNCPTR(func) do { \
if (!(p_##func =
wine_dlsym( egl_handle, #func, NULL, 0
))) \
if (!(p_##func =
dlsym( egl_handle, #func
))) \
{ ERR( "can't find symbol %s\n", #func); return FALSE; } \
} while(0)
LOAD_FUNCPTR
(
eglCreateContext
);
...
...
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