What's new

Bug in the Configuration API

Lig

New member
Theres a bug in the configuration api with the function ConfigSetParameter. For some reason (that hurts my head to think about) if you pass a c++ type bool to ConfigSetParameter for the function parameter ParamValue it will always set the mupen64plus core parameter to true. If you make an int, cast the bool to an int, assign the int to the casted bool and then pass the int it works just fine.
 

Richard42

Emulator Developer
Since the API is C, it expects a 4-byte 'int' even for a boolean value. Some C++ compilers however may use a single byte for the 'bool' data type. So, when calling from C++, you will need to assign the boolean value to an int and pass in a pointer to the int.
 

Top