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
2801436a
Commit
2801436a
authored
Jun 04, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 07, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineandroid: Move DllMain to separated file.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
parent
abb69b8d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
83 additions
and
14 deletions
+83
-14
Makefile.in
dlls/wineandroid.drv/Makefile.in
+1
-0
android.h
dlls/wineandroid.drv/android.h
+1
-0
dllmain.c
dlls/wineandroid.drv/dllmain.c
+36
-0
init.c
dlls/wineandroid.drv/init.c
+15
-14
unixlib.h
dlls/wineandroid.drv/unixlib.h
+30
-0
No files found.
dlls/wineandroid.drv/Makefile.in
View file @
2801436a
...
...
@@ -7,6 +7,7 @@ EXTRADLLFLAGS = -mcygwin
C_SRCS
=
\
device.c
\
dllmain.c
\
init.c
\
keyboard.c
\
opengl.c
\
...
...
dlls/wineandroid.drv/android.h
View file @
2801436a
...
...
@@ -34,6 +34,7 @@
#include "winbase.h"
#include "ntgdi.h"
#include "wine/gdi_driver.h"
#include "unixlib.h"
#include "android_native.h"
...
...
dlls/wineandroid.drv/dllmain.c
0 → 100644
View file @
2801436a
/*
* wineandroid.drv entry points
*
* Copyright 2022 Jacek Caban for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "unixlib.h"
/***********************************************************************
* dll initialisation routine
*/
BOOL
WINAPI
DllMain
(
HINSTANCE
inst
,
DWORD
reason
,
LPVOID
reserved
)
{
if
(
reason
==
DLL_PROCESS_ATTACH
)
return
TRUE
;
DisableThreadLibraryCalls
(
inst
);
return
!
ANDROID_CALL
(
init
,
NULL
);
}
dlls/wineandroid.drv/init.c
View file @
2801436a
...
...
@@ -556,7 +556,7 @@ JavaVM **p_java_vm = NULL;
jobject
*
p_java_object
=
NULL
;
unsigned
short
*
p_java_gdt_sel
=
NULL
;
static
BOOL
process_attach
(
void
)
static
HRESULT
android_init
(
void
*
arg
)
{
pthread_mutexattr_t
attr
;
jclass
class
;
...
...
@@ -565,7 +565,7 @@ static BOOL process_attach(void)
JavaVM
*
java_vm
;
void
*
ntdll
;
if
(
!
(
ntdll
=
dlopen
(
"ntdll.so"
,
RTLD_NOW
)))
return
FALSE
;
if
(
!
(
ntdll
=
dlopen
(
"ntdll.so"
,
RTLD_NOW
)))
return
STATUS_UNSUCCESSFUL
;
p_java_vm
=
dlsym
(
ntdll
,
"java_vm"
);
p_java_object
=
dlsym
(
ntdll
,
"java_object"
);
...
...
@@ -598,19 +598,20 @@ static BOOL process_attach(void)
#endif
}
__wine_set_user_driver
(
&
android_drv_funcs
,
WINE_GDI_DRIVER_VERSION
);
return
TRUE
;
return
STATUS_SUCCESS
;
}
/***********************************************************************
* dll initialisation routine
*/
BOOL
WINAPI
DllMain
(
HINSTANCE
inst
,
DWORD
reason
,
LPVOID
reserved
)
const
unixlib_entry_t
__wine_unix_call_funcs
[]
=
{
switch
(
reason
)
{
case
DLL_PROCESS_ATTACH
:
DisableThreadLibraryCalls
(
inst
);
return
process_attach
();
}
return
TRUE
;
android_init
,
};
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
)
{
return
__wine_unix_call_funcs
[
code
](
params
);
}
dlls/wineandroid.drv/unixlib.h
0 → 100644
View file @
2801436a
/*
* Copyright 2022 Jacek Caban for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "ntuser.h"
#include "wine/unixlib.h"
enum
android_funcs
{
unix_init
,
unix_funcs_count
};
/* 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 )
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