Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
ccf6211c
Commit
ccf6211c
authored
Aug 16, 2018
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Aug 16, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineandroid.drv: Use the ARRAY_SIZE() macro.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5e96cd72
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
device.c
dlls/wineandroid.drv/device.c
+2
-2
init.c
dlls/wineandroid.drv/init.c
+1
-1
keyboard.c
dlls/wineandroid.drv/keyboard.c
+5
-5
No files found.
dlls/wineandroid.drv/device.c
View file @
ccf6211c
...
...
@@ -1363,7 +1363,7 @@ static int perform( ANativeWindow *window, int operation, ... )
case
NATIVE_WINDOW_SET_POST_TRANSFORM_CROP
:
default:
FIXME
(
"unsupported perform hwnd %p op %d %s
\n
"
,
win
->
hwnd
,
operation
,
operation
<
sizeof
(
names
)
/
sizeof
(
names
[
0
]
)
?
names
[
operation
]
:
"???"
);
operation
<
ARRAY_SIZE
(
names
)
?
names
[
operation
]
:
"???"
);
break
;
}
va_end
(
args
);
...
...
@@ -1419,7 +1419,7 @@ void release_ioctl_window( struct ANativeWindow *window )
if
(
InterlockedDecrement
(
&
win
->
ref
)
>
0
)
return
;
TRACE
(
"%p %p
\n
"
,
win
,
win
->
hwnd
);
for
(
i
=
0
;
i
<
sizeof
(
win
->
buffers
)
/
sizeof
(
win
->
buffers
[
0
]
);
i
++
)
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
win
->
buffers
);
i
++
)
if
(
win
->
buffers
[
i
])
win
->
buffers
[
i
]
->
buffer
.
common
.
decRef
(
&
win
->
buffers
[
i
]
->
buffer
.
common
);
destroy_ioctl_window
(
win
->
hwnd
,
win
->
opengl
);
...
...
dlls/wineandroid.drv/init.c
View file @
ccf6211c
...
...
@@ -677,7 +677,7 @@ static BOOL process_attach(void)
load_android_libs
();
(
*
java_vm
)
->
AttachCurrentThread
(
java_vm
,
&
jni_env
,
0
);
class
=
(
*
jni_env
)
->
GetObjectClass
(
jni_env
,
object
);
(
*
jni_env
)
->
RegisterNatives
(
jni_env
,
class
,
methods
,
sizeof
(
methods
)
/
sizeof
(
methods
[
0
])
);
(
*
jni_env
)
->
RegisterNatives
(
jni_env
,
class
,
methods
,
ARRAY_SIZE
(
methods
)
);
(
*
jni_env
)
->
DeleteLocalRef
(
jni_env
,
class
);
#ifdef __i386__
wine_set_fs
(
old_fs
);
/* the Java VM hijacks %fs for its own purposes, restore it */
...
...
dlls/wineandroid.drv/keyboard.c
View file @
ccf6211c
...
...
@@ -638,7 +638,7 @@ static UINT scancode_to_vkey( UINT scan )
{
UINT
j
;
for
(
j
=
0
;
j
<
sizeof
(
vkey_to_scancode
)
/
sizeof
(
vkey_to_scancode
[
0
]
);
j
++
)
for
(
j
=
0
;
j
<
ARRAY_SIZE
(
vkey_to_scancode
);
j
++
)
if
(
vkey_to_scancode
[
j
]
==
scan
)
return
j
;
return
0
;
...
...
@@ -648,7 +648,7 @@ static const char* vkey_to_name( UINT vkey )
{
UINT
j
;
for
(
j
=
0
;
j
<
sizeof
(
vkey_names
)
/
sizeof
(
vkey_names
[
0
]
);
j
++
)
for
(
j
=
0
;
j
<
ARRAY_SIZE
(
vkey_names
);
j
++
)
if
(
vkey_names
[
j
].
vkey
==
vkey
)
return
vkey_names
[
j
].
name
;
return
NULL
;
...
...
@@ -724,7 +724,7 @@ jboolean keyboard_event( JNIEnv *env, jobject obj, jint win, jint action, jint k
{
union
event_data
data
;
if
((
unsigned
int
)
keycode
>=
sizeof
(
keycode_to_vkey
)
/
sizeof
(
keycode_to_vkey
[
0
]
)
||
if
((
unsigned
int
)
keycode
>=
ARRAY_SIZE
(
keycode_to_vkey
)
||
!
keycode_to_vkey
[
keycode
])
{
p__android_log_print
(
ANDROID_LOG_WARN
,
"wine"
,
...
...
@@ -931,7 +931,7 @@ UINT CDECL ANDROID_MapVirtualKeyEx( UINT code, UINT maptype, HKL hkl )
code
=
VK_LMENU
;
break
;
}
if
(
code
<
sizeof
(
vkey_to_scancode
)
/
sizeof
(
vkey_to_scancode
[
0
]
))
ret
=
vkey_to_scancode
[
code
];
if
(
code
<
ARRAY_SIZE
(
vkey_to_scancode
))
ret
=
vkey_to_scancode
[
code
];
break
;
case
MAPVK_VSC_TO_VK
:
case
MAPVK_VSC_TO_VK_EX
:
...
...
@@ -993,7 +993,7 @@ HKL CDECL ANDROID_GetKeyboardLayout( DWORD thread_id )
SHORT
CDECL
ANDROID_VkKeyScanEx
(
WCHAR
ch
,
HKL
hkl
)
{
SHORT
ret
=
-
1
;
if
(
ch
<
sizeof
(
char_vkey_map
)
/
sizeof
(
char_vkey_map
[
0
]
))
ret
=
char_vkey_map
[
ch
];
if
(
ch
<
ARRAY_SIZE
(
char_vkey_map
))
ret
=
char_vkey_map
[
ch
];
TRACE_
(
key
)(
"ch %04x hkl %p -> %04x
\n
"
,
ch
,
hkl
,
ret
);
return
ret
;
}
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