aboutsummaryrefslogtreecommitdiffstats
path: root/android
diff options
context:
space:
mode:
Diffstat (limited to 'android')
-rwxr-xr-xandroid/camera/camera-capture-windows.c1
-rw-r--r--android/hw-events.h11
-rw-r--r--android/main-common.c2
-rw-r--r--android/utils/path.c6
4 files changed, 18 insertions, 2 deletions
diff --git a/android/camera/camera-capture-windows.c b/android/camera/camera-capture-windows.c
index e1c5538..7f9df39 100755
--- a/android/camera/camera-capture-windows.c
+++ b/android/camera/camera-capture-windows.c
@@ -19,6 +19,7 @@
* This code uses capXxx API, available via capCreateCaptureWindow.
*/
+#include <windows.h>
#include <vfw.h>
#include "android/camera/camera-capture.h"
#include "android/camera/camera-format-converters.h"
diff --git a/android/hw-events.h b/android/hw-events.h
index 488c299..b8340bd 100644
--- a/android/hw-events.h
+++ b/android/hw-events.h
@@ -41,6 +41,17 @@ typedef enum {
/* BEWARE: The following codes are defined by the Linux kernel headers.
* The Android "Menu" key is KEY_SOFT1, *not* KEY_MENU
*/
+/* NOTE: mingw's winnt.h define DELETE to constant
+ i586-mingw32msvc: #define DELETE 0x00010000L
+ x86_64-w64-mingw32-gcc: #define DELETE (0x00010000L)
+
+ KEY_CODE belows glues "KEY_" and "DELETE".
+ While KEY_0x00010000L may not mean anything,
+ KEY_(0x00010000L) is absolutely harmful to compiler.
+ Undefine DELETE below
+ */
+#undef DELETE
+
#define EVENT_KEY_LIST \
KEY_CODE(ESC ,1) \
KEY_CODE(1 ,2) \
diff --git a/android/main-common.c b/android/main-common.c
index 04d200a..2d535c7 100644
--- a/android/main-common.c
+++ b/android/main-common.c
@@ -232,7 +232,7 @@ sdl_set_window_icon( void )
SDL_GetWMInfo(&wminfo);
- SetClassLong( wminfo.window, GCL_HICON, (LONG)icon );
+ SetClassLongPtr( wminfo.window, GCLP_HICON, (LONG)icon );
#else /* !_WIN32 */
unsigned icon_w, icon_h;
size_t icon_bytes;
diff --git a/android/utils/path.c b/android/utils/path.c
index 1bcdc4e..3e9d97b 100644
--- a/android/utils/path.c
+++ b/android/utils/path.c
@@ -78,8 +78,12 @@ path_parent( const char* path, int levels )
while (base > path && !ispathsep(base[-1]))
base--;
- if (base <= path) /* we can't go that far */
+ if (base <= path) {
+ if (end == base+1 && base[0] == '.' && levels == 1)
+ return strdup("..");
+ /* we can't go that far */
return NULL;
+ }
if (end == base+1 && base[0] == '.')
goto Next;