[Scummvm-cvs-logs] scummvm master -> bceab2656bdff4aa99f99b047f6bbd18ad5f86fc

dhewg dhewg at wiibrew.org
Sat Apr 2 13:34:22 CEST 2011


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
23ad90b781 SCI: Replace not required emumidi header
bceab2656b ANDROID: Attempt at working around some HTC fail


Commit: 23ad90b781c15249dc9214c552654589b51f5147
    https://github.com/scummvm/scummvm/commit/23ad90b781c15249dc9214c552654589b51f5147
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-04-02T04:31:53-07:00

Commit Message:
SCI: Replace not required emumidi header

Changed paths:
    engines/sci/sound/drivers/midi.cpp



diff --git a/engines/sci/sound/drivers/midi.cpp b/engines/sci/sound/drivers/midi.cpp
index 78dd69c..f674a50 100644
--- a/engines/sci/sound/drivers/midi.cpp
+++ b/engines/sci/sound/drivers/midi.cpp
@@ -28,9 +28,9 @@
 #include "common/config-manager.h"
 #include "common/file.h"
 #include "common/memstream.h"
+#include "common/system.h"
 
 #include "audio/fmopl.h"
-#include "audio/softsynth/emumidi.h"
 
 #include "sci/resource.h"
 #include "sci/engine/features.h"
@@ -393,7 +393,7 @@ int MidiPlayer_Midi::getVolume() {
 
 void MidiPlayer_Midi::setReverb(int8 reverb) {
 	assert(reverb < kReverbConfigNr);
-	
+
 	if (_hasReverb && (_reverb != reverb))
 		sendMt32SysEx(0x100001, _reverbConfig[reverb], 3, true);
 


Commit: bceab2656bdff4aa99f99b047f6bbd18ad5f86fc
    https://github.com/scummvm/scummvm/commit/bceab2656bdff4aa99f99b047f6bbd18ad5f86fc
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-04-02T04:32:03-07:00

Commit Message:
ANDROID: Attempt at working around some HTC fail

Changed paths:
    backends/platform/android/android.cpp
    backends/platform/android/android.h
    backends/platform/android/gfx.cpp



diff --git a/backends/platform/android/android.cpp b/backends/platform/android/android.cpp
index 9a69956..1a83289 100644
--- a/backends/platform/android/android.cpp
+++ b/backends/platform/android/android.cpp
@@ -101,6 +101,7 @@ OSystem_Android::OSystem_Android(int audio_sample_rate, int audio_buffer_size) :
 	_screen_changeid(0),
 	_egl_surface_width(0),
 	_egl_surface_height(0),
+	_htc_fail(false),
 	_force_redraw(false),
 	_game_texture(0),
 	_overlay_texture(0),
@@ -132,11 +133,19 @@ OSystem_Android::OSystem_Android(int audio_sample_rate, int audio_buffer_size) :
 	_touchpad_scale(66),
 	_dpad_scale(4),
 	_trackball_scale(2) {
+	Common::String fp = getSystemProperty("ro.build.fingerprint");
+
 	LOGI("Running on: [%s] [%s] SDK:%s ABI:%s",
-			getSystemProperty("ro.build.fingerprint").c_str(),
+			fp.c_str(),
 			getSystemProperty("ro.build.display.id").c_str(),
 			getSystemProperty("ro.build.version.sdk").c_str(),
 			getSystemProperty("ro.product.cpu.abi").c_str());
+
+	fp.toLowercase();
+	_htc_fail = fp.contains("htc");
+
+	if (_htc_fail)
+		LOGI("Enabling HTC workaround");
 }
 
 OSystem_Android::~OSystem_Android() {
diff --git a/backends/platform/android/android.h b/backends/platform/android/android.h
index eb05dbd..40dc0fe 100644
--- a/backends/platform/android/android.h
+++ b/backends/platform/android/android.h
@@ -99,6 +99,7 @@ private:
 	int _screen_changeid;
 	int _egl_surface_width;
 	int _egl_surface_height;
+	bool _htc_fail;
 
 	bool _force_redraw;
 
diff --git a/backends/platform/android/gfx.cpp b/backends/platform/android/gfx.cpp
index bbd09ad..ab7240e 100644
--- a/backends/platform/android/gfx.cpp
+++ b/backends/platform/android/gfx.cpp
@@ -523,6 +523,14 @@ void OSystem_Android::updateScreen() {
 
 	if (!JNI::swapBuffers())
 		LOGW("swapBuffers failed: 0x%x", glGetError());
+
+	// HTC's GLES drivers are made of fail
+	// http://code.google.com/p/android/issues/detail?id=3047
+	if (!_show_overlay && _htc_fail) {
+		const Common::Rect &rect = _game_texture->getDrawRect();
+
+		glScissor(rect.left, rect.top, rect.width(), rect.height());
+	}
 }
 
 Graphics::Surface *OSystem_Android::lockScreen() {






More information about the Scummvm-git-logs mailing list