aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backends/platform/android/android.cpp10
-rw-r--r--backends/platform/android/android.h14
-rw-r--r--backends/platform/android/asset-archive.cpp14
-rw-r--r--backends/platform/android/jni.cpp4
-rw-r--r--backends/platform/android/jni.h3
-rw-r--r--backends/platform/android/org/inodes/gus/scummvm/Unpacker.java1
-rw-r--r--backends/platform/android/texture.cpp3
7 files changed, 31 insertions, 18 deletions
diff --git a/backends/platform/android/android.cpp b/backends/platform/android/android.cpp
index 491e5fbc72..2d396f2c48 100644
--- a/backends/platform/android/android.cpp
+++ b/backends/platform/android/android.cpp
@@ -55,7 +55,8 @@ extern "C" {
expr, file, line);
}
- void __assert2(const char *file, int line, const char *func, const char *expr) {
+ void __assert2(const char *file, int line, const char *func,
+ const char *expr) {
__android_log_assert(expr, android_log_tag,
"Assertion failure: '%s' in %s:%d (%s)",
expr, file, line, func);
@@ -152,7 +153,7 @@ void *OSystem_Android::timerThreadFunc(void *arg) {
sem_wait(&JNI::pause_sem);
LOGD("timer thread woke up");
}
-
+
timer->handler();
nanosleep(&tv, 0);
}
@@ -199,7 +200,7 @@ void *OSystem_Android::audioThreadFunc(void *arg) {
sem_wait(&JNI::pause_sem);
LOGD("audio thread woke up");
}
-
+
buf = (byte *)env->GetPrimitiveArrayCritical(bufa, 0);
assert(buf);
@@ -650,7 +651,8 @@ void OSystem_Android::addSysArchivesToSearchSet(Common::SearchSet &s,
JNI::addSysArchivesToSearchSet(s, priority);
}
-void OSystem_Android::logMessage(LogMessageType::Type type, const char *message) {
+void OSystem_Android::logMessage(LogMessageType::Type type,
+ const char *message) {
switch (type) {
case LogMessageType::kDebug:
__android_log_write(ANDROID_LOG_DEBUG, android_log_tag, message);
diff --git a/backends/platform/android/android.h b/backends/platform/android/android.h
index aa6016e3d2..5db10fb180 100644
--- a/backends/platform/android/android.h
+++ b/backends/platform/android/android.h
@@ -177,7 +177,8 @@ protected:
virtual void grabPalette(byte *colors, uint start, uint num);
public:
- virtual void copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h);
+ virtual void copyRectToScreen(const byte *buf, int pitch, int x, int y,
+ int w, int h);
virtual void updateScreen();
virtual Graphics::Surface *lockScreen();
virtual void unlockScreen();
@@ -190,7 +191,8 @@ public:
virtual void hideOverlay();
virtual void clearOverlay();
virtual void grabOverlay(OverlayColor *buf, int pitch);
- virtual void copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h);
+ virtual void copyRectToOverlay(const OverlayColor *buf, int pitch,
+ int x, int y, int w, int h);
virtual int16 getOverlayHeight();
virtual int16 getOverlayWidth();
@@ -214,7 +216,10 @@ public:
virtual bool showMouse(bool visible);
virtual void warpMouse(int x, int y);
- virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, int cursorTargetScale, const Graphics::PixelFormat *format);
+ virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX,
+ int hotspotY, uint32 keycolor,
+ int cursorTargetScale,
+ const Graphics::PixelFormat *format);
virtual void setCursorPalette(const byte *colors, uint start, uint num);
virtual void disableCursorPalette(bool disable);
@@ -240,7 +245,8 @@ public:
virtual Common::TimerManager *getTimerManager();
virtual FilesystemFactory *getFilesystemFactory();
virtual void logMessage(LogMessageType::Type type, const char *message);
- virtual void addSysArchivesToSearchSet(Common::SearchSet &s, int priority = 0);
+ virtual void addSysArchivesToSearchSet(Common::SearchSet &s,
+ int priority = 0);
};
#endif
diff --git a/backends/platform/android/asset-archive.cpp b/backends/platform/android/asset-archive.cpp
index eb2530823d..26b1a6ad39 100644
--- a/backends/platform/android/asset-archive.cpp
+++ b/backends/platform/android/asset-archive.cpp
@@ -99,7 +99,7 @@ JavaInputStream::JavaInputStream(JNIEnv *env, jobject is) :
{
_input_stream = env->NewGlobalRef(is);
_buflen = 8192;
- _buf = static_cast<jbyteArray>(env->NewGlobalRef(env->NewByteArray(_buflen)));
+ _buf = (jbyteArray)env->NewGlobalRef(env->NewByteArray(_buflen));
jclass cls = env->GetObjectClass(_input_stream);
MID_mark = env->GetMethodID(cls, "mark", "(I)V");
@@ -142,7 +142,7 @@ uint32 JavaInputStream::read(void *dataPtr, uint32 dataSize) {
if (_buflen < jint(dataSize)) {
_buflen = dataSize;
-
+
env->DeleteGlobalRef(_buf);
_buf = static_cast<jbyteArray>(env->NewGlobalRef(env->NewByteArray(_buflen)));
}
@@ -304,7 +304,8 @@ AssetFdReadStream::AssetFdReadStream(JNIEnv *env, jobject assetfd) :
_declared_len = env->CallLongMethod(_assetfd, MID_getDeclaredLength);
jmethodID MID_getFileDescriptor =
- env->GetMethodID(cls, "getFileDescriptor", "()Ljava/io/FileDescriptor;");
+ env->GetMethodID(cls, "getFileDescriptor",
+ "()Ljava/io/FileDescriptor;");
assert(MID_getFileDescriptor);
jobject javafd = env->CallObjectMethod(_assetfd, MID_getFileDescriptor);
assert(javafd);
@@ -376,8 +377,8 @@ AndroidAssetArchive::AndroidAssetArchive(jobject am) {
"(Ljava/lang/String;I)Ljava/io/InputStream;");
assert(MID_open);
- MID_openFd = env->GetMethodID(cls, "openFd",
- "(Ljava/lang/String;)Landroid/content/res/AssetFileDescriptor;");
+ MID_openFd = env->GetMethodID(cls, "openFd", "(Ljava/lang/String;)"
+ "Landroid/content/res/AssetFileDescriptor;");
assert(MID_openFd);
MID_list = env->GetMethodID(cls, "list",
@@ -421,7 +422,8 @@ int AndroidAssetArchive::listMembers(Common::ArchiveMemberList &member_list) {
dirlist.pop_back();
jstring jpath = env->NewStringUTF(dir.c_str());
- jobjectArray jpathlist = static_cast<jobjectArray>(env->CallObjectMethod(_am, MID_list, jpath));
+ jobjectArray jpathlist =
+ (jobjectArray)env->CallObjectMethod(_am, MID_list, jpath);
if (env->ExceptionCheck()) {
warning("Error while calling AssetManager->list(%s). Ignoring.",
diff --git a/backends/platform/android/jni.cpp b/backends/platform/android/jni.cpp
index 175973079f..e1acabd6d3 100644
--- a/backends/platform/android/jni.cpp
+++ b/backends/platform/android/jni.cpp
@@ -90,9 +90,9 @@ const JNINativeMethod JNI::_natives[] = {
{ "destroy", "()V",
(void *)JNI::destroy },
{ "setSurface", "(II)V",
- (void *)JNI::setSurface },
+ (void *)JNI::setSurface },
{ "main", "([Ljava/lang/String;)I",
- (void *)JNI::main },
+ (void *)JNI::main },
{ "pushEvent", "(Lorg/inodes/gus/scummvm/Event;)V",
(void *)JNI::pushEvent },
{ "enableZoning", "(Z)V",
diff --git a/backends/platform/android/jni.h b/backends/platform/android/jni.h
index 569a3dd79b..84688137df 100644
--- a/backends/platform/android/jni.h
+++ b/backends/platform/android/jni.h
@@ -149,7 +149,8 @@ inline bool JNI::swapBuffers() {
}
inline int JNI::writeAudio(JNIEnv *env, jbyteArray &data, int offset, int size) {
- return env->CallIntMethod(_jobj_audio_track, _MID_AudioTrack_write, data, offset, size);
+ return env->CallIntMethod(_jobj_audio_track, _MID_AudioTrack_write, data,
+ offset, size);
}
#endif
diff --git a/backends/platform/android/org/inodes/gus/scummvm/Unpacker.java b/backends/platform/android/org/inodes/gus/scummvm/Unpacker.java
index 8811b1f3ae..c4b2ad7f5d 100644
--- a/backends/platform/android/org/inodes/gus/scummvm/Unpacker.java
+++ b/backends/platform/android/org/inodes/gus/scummvm/Unpacker.java
@@ -370,3 +370,4 @@ public class Unpacker extends Activity {
}
}
}
+
diff --git a/backends/platform/android/texture.cpp b/backends/platform/android/texture.cpp
index ea8a89df78..cb12d264b8 100644
--- a/backends/platform/android/texture.cpp
+++ b/backends/platform/android/texture.cpp
@@ -332,7 +332,8 @@ void GLESPaletteTexture::uploadTexture() const {
0, texture_size, _texture));
}
-void GLESPaletteTexture::drawTexture(GLshort x, GLshort y, GLshort w, GLshort h) {
+void GLESPaletteTexture::drawTexture(GLshort x, GLshort y, GLshort w,
+ GLshort h) {
if (_all_dirty) {
GLCALL(glBindTexture(GL_TEXTURE_2D, _texture_name));
GLCALL(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER,