[Scummvm-cvs-logs] SF.net SVN: scummvm:[45332] scummvm/trunk/engines/sci/sfx

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Thu Oct 22 10:55:55 CEST 2009


Revision: 45332
          http://scummvm.svn.sourceforge.net/scummvm/?rev=45332&view=rev
Author:   thebluegr
Date:     2009-10-22 08:55:54 +0000 (Thu, 22 Oct 2009)

Log Message:
-----------
Fixed signed/unsigned issues with the property() function of the Adlib driver

Modified Paths:
--------------
    scummvm/trunk/engines/sci/sfx/sci_midi.h
    scummvm/trunk/engines/sci/sfx/softseq/adlib.cpp
    scummvm/trunk/engines/sci/sfx/softseq/adlib.h

Modified: scummvm/trunk/engines/sci/sfx/sci_midi.h
===================================================================
--- scummvm/trunk/engines/sci/sfx/sci_midi.h	2009-10-22 08:46:34 UTC (rev 45331)
+++ scummvm/trunk/engines/sci/sfx/sci_midi.h	2009-10-22 08:55:54 UTC (rev 45332)
@@ -86,7 +86,7 @@
 	}
 
 	virtual int getVolume() {
-		return _driver ? _driver->property(MIDI_PROP_MASTER_VOLUME, -1) : 0;
+		return _driver ? _driver->property(MIDI_PROP_MASTER_VOLUME, 0xffff) : 0;
  	}
 
 	virtual void playSwitch(bool play) {

Modified: scummvm/trunk/engines/sci/sfx/softseq/adlib.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/softseq/adlib.cpp	2009-10-22 08:46:34 UTC (rev 45331)
+++ scummvm/trunk/engines/sci/sfx/softseq/adlib.cpp	2009-10-22 08:55:54 UTC (rev 45332)
@@ -629,16 +629,16 @@
 	return true;
 }
 
-int32 MidiDriver_Adlib::property(int prop, int32 param) {
+uint32 MidiDriver_Adlib::property(int prop, uint32 param) {
 	switch(prop) {
 	case MIDI_PROP_MASTER_VOLUME:
-		if(param != -1)
+		if (param != 0xffff)
 			_masterVolume = param;
 		return _masterVolume;
 	default:
 		break;
 	}
-	return -1;
+	return 0;
 }
 
 

Modified: scummvm/trunk/engines/sci/sfx/softseq/adlib.h
===================================================================
--- scummvm/trunk/engines/sci/sfx/softseq/adlib.h	2009-10-22 08:46:34 UTC (rev 45331)
+++ scummvm/trunk/engines/sci/sfx/softseq/adlib.h	2009-10-22 08:55:54 UTC (rev 45332)
@@ -55,7 +55,7 @@
 	void setVolume(byte volume);
 	void playSwitch(bool play);
 	bool loadResource(const byte *data, uint size);
-	virtual int32 property(int prop, int32 param);
+	uint32 property(int prop, uint32 param);
 
 private:
 	enum ChannelID {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list