File tree Expand file tree Collapse file tree 4 files changed +22
-6
lines changed Expand file tree Collapse file tree 4 files changed +22
-6
lines changed Original file line number Diff line number Diff line change 1444
1444
80268574:_savegpr_30
1445
1445
80268578:_savegpr_31
1446
1446
802685CC:__udivdi3
1447
+ 802686B8:__divdi3
1447
1448
802687F0:__umoddi3
1448
1449
1449
1450
// printf.c
Original file line number Diff line number Diff line change 1436
1436
8025E9E4:_savegpr_30
1437
1437
8025E9E8:_savegpr_31
1438
1438
8025EA3C:__udivdi3
1439
+ 8025EB28:__divdi3
1439
1440
8025EC60:__umoddi3
1440
1441
1441
1442
// printf.c
Original file line number Diff line number Diff line change 1442
1442
80264994:_savegpr_30
1443
1443
80264998:_savegpr_31
1444
1444
802649EC:__udivdi3
1445
+ 80264AD8:__divdi3
1445
1446
80264C10:__umoddi3
1446
1447
1447
1448
// printf.c
Original file line number Diff line number Diff line change @@ -124,15 +124,28 @@ const char *getValueString(int32_t slot)
124
124
uint32_t FPS = *reinterpret_cast <uint32_t *>(
125
125
*reinterpret_cast <uint32_t *>(GlobalWorkPointer) + 0x4 );
126
126
127
- uint64_t CurrentTime = *reinterpret_cast <uint64_t *>(Address) / (TimeBase / FPS);
127
+ int64_t CurrentTime = *reinterpret_cast <int64_t *>(Address) / (TimeBase / FPS);
128
+ const char *NegativeSign = " " ;
128
129
129
- uint32_t hour = CurrentTime / 3600 / FPS;
130
- uint32_t minute = (CurrentTime / 60 / FPS) % 60 ;
131
- uint32_t second = (CurrentTime / FPS) % 60 ;
132
- uint32_t frame = CurrentTime % FPS;
130
+ // Check if the value is negative
131
+ if (CurrentTime < 0 )
132
+ {
133
+ // Convert the number to positive
134
+ CurrentTime = -CurrentTime;
135
+ NegativeSign = " -" ;
136
+ }
137
+
138
+ // Handle the value as unsigned
139
+ uint64_t CurrentTimeUnsigned = static_cast <uint64_t >(CurrentTime);
140
+
141
+ uint32_t hour = CurrentTimeUnsigned / 3600 / FPS;
142
+ uint32_t minute = (CurrentTimeUnsigned / 60 / FPS) % 60 ;
143
+ uint32_t second = (CurrentTimeUnsigned / FPS) % 60 ;
144
+ uint32_t frame = CurrentTimeUnsigned % FPS;
133
145
134
146
sprintf (tempDisplayBuffer,
135
- " %02" PRIu32 " :%02" PRIu32 " :%02" PRIu32 " .%02" PRIu32,
147
+ " %s%02" PRIu32 " :%02" PRIu32 " :%02" PRIu32 " .%02" PRIu32,
148
+ NegativeSign,
136
149
hour,
137
150
minute,
138
151
second,
You can’t perform that action at this time.
0 commit comments