Merge pull request #944 from LuigiBlood/64dd_2
Fix Disk.cpp time/date code & F-Zero X (J) RDB update
This commit is contained in:
commit
8df90936f8
|
@ -1805,6 +1805,7 @@ Clear Frame=2
|
|||
[4D3E622E-9B828B4E-C:4A]
|
||||
Good Name=F-ZERO X (J)
|
||||
Internal Name=F-ZERO X
|
||||
RDRAM Size=8
|
||||
Status=Compatible
|
||||
Plugin Note=[Glide64] missing menu effects
|
||||
32bit=No
|
||||
|
|
|
@ -17,6 +17,12 @@
|
|||
#include <Project64-core/N64System/Mips/RegisterClass.h>
|
||||
#include <Project64-core/N64System/Mips/SystemTiming.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <Windows.h>
|
||||
#else
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
bool dd_write;
|
||||
bool dd_reset_hold;
|
||||
uint32_t dd_track_offset, dd_zone;
|
||||
|
@ -44,13 +50,13 @@ void DiskCommand()
|
|||
#else
|
||||
time_t ltime;
|
||||
ltime = time(<ime);
|
||||
|
||||
|
||||
struct tm result = { 0 };
|
||||
localtime_r(<ime, &result);
|
||||
|
||||
//BCD format needed for 64DD RTC
|
||||
uint8_t year = (uint8_t)(((result.tm_year / 10) << 4) | (result.tm_year % 10));
|
||||
uint8_t month = (uint8_t)(((result.tm_mon / 10) << 4) | (result.tm_mon % 10));
|
||||
uint8_t month = (uint8_t)((((result.tm_mon + 1) / 10) << 4) | ((result.tm_mon + 1) % 10));
|
||||
uint8_t day = (uint8_t)(((result.tm_mday / 10) << 4) | (result.tm_mday % 10));
|
||||
uint8_t hour = (uint8_t)(((result.tm_hour / 10) << 4) | (result.tm_hour % 10));
|
||||
uint8_t minute = (uint8_t)(((result.tm_min / 10) << 4) | (result.tm_min % 10));
|
||||
|
|
Loading…
Reference in New Issue