Change declaration, we should only need int.

This commit is contained in:
Emmet Young 2016-02-04 12:57:09 +11:00
parent e6b1fd3aec
commit 494ad71352
2 changed files with 4 additions and 3 deletions

View File

@ -259,7 +259,8 @@ void memoryUpdateMBC3Clock(struct gb_cart* gb_cart)
}
diff /= 24;
gb_cart->rtc_data[3] += (int)(diff & 0xffffffff);
gb_cart->rtc_data[3] += (int)(diff & 0xFFFFFFFF);
if (gb_cart->rtc_data[3] > 255) {
if (gb_cart->rtc_data[3] > 511) {
gb_cart->rtc_data[3] %= 512;

View File

@ -30,8 +30,8 @@ struct gb_cart
uint32_t rtc_latch;
int32_t rtc_data[5];
int32_t rtc_latch_data[5];
int rtc_data[5];
int rtc_latch_data[5];
time_t rtc_last_time;
void(*read_gb_cart)(struct gb_cart* gb_cart, uint16_t address, uint8_t* data);