mirror of
https://github.com/akuker/RASCSI.git
synced 2024-12-21 23:29:39 +00:00
Only return RTC page if not changeable pages are requested (#731)
This commit is contained in:
parent
8f90ce4649
commit
08156f763f
@ -169,9 +169,9 @@ void HostServices::AddModePages(map<int, vector<BYTE>>& pages, int page, bool ch
|
|||||||
|
|
||||||
void HostServices::AddRealtimeClockPage(map<int, vector<BYTE>>& pages, bool changeable) const
|
void HostServices::AddRealtimeClockPage(map<int, vector<BYTE>>& pages, bool changeable) const
|
||||||
{
|
{
|
||||||
|
if (!changeable) {
|
||||||
vector<BYTE> buf(10);
|
vector<BYTE> buf(10);
|
||||||
|
|
||||||
if (!changeable) {
|
|
||||||
// Data structure version 1.0
|
// Data structure version 1.0
|
||||||
buf[2] = 0x01;
|
buf[2] = 0x01;
|
||||||
buf[3] = 0x00;
|
buf[3] = 0x00;
|
||||||
@ -185,7 +185,7 @@ void HostServices::AddRealtimeClockPage(map<int, vector<BYTE>>& pages, bool chan
|
|||||||
buf[8] = tm.tm_min;
|
buf[8] = tm.tm_min;
|
||||||
// Ignore leap second for simplicity
|
// Ignore leap second for simplicity
|
||||||
buf[9] = tm.tm_sec < 60 ? tm.tm_sec : 59;
|
buf[9] = tm.tm_sec < 60 ? tm.tm_sec : 59;
|
||||||
}
|
|
||||||
|
|
||||||
pages[32] = buf;
|
pages[32] = buf;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user