Clean up error handling a bit

This commit is contained in:
Jeffrey Pfau 2013-09-30 01:31:14 -07:00
parent 3439fa5bf4
commit be36c1b5d6
2 changed files with 6 additions and 3 deletions

View File

@ -32,11 +32,10 @@ enum GBAError {
enum GBALogLevel {
GBA_LOG_STUB,
GBA_LOG_DEBUG,
GBA_LOG_GAME_ERROR,
GBA_LOG_INFO,
GBA_LOG_WARN,
GBA_LOG_ERROR,
GBA_LOG_GAME_ERROR
};
enum GBAKey {

View File

@ -283,8 +283,12 @@ static uint16_t GBAVideoSoftwareRendererWriteVideoRegister(struct GBAVideoRender
softwareRenderer->winout.packed = value;
softwareRenderer->objwin.packed = value >> 8;
break;
case REG_MOSAIC:
case REG_GREENSWP:
GBALog(0, GBA_LOG_STUB, "Stub video register write: 0x%03X", address);
break;
default:
GBALog(0, GBA_LOG_STUB, "Stub video register write: %03x", address);
GBALog(0, GBA_LOG_GAME_ERROR, "Invalid video register: 0x%03X", address);
}
return value;
}