mirror of
https://github.com/rvtr/GodMode9i.git
synced 2025-11-02 00:11:07 -04:00
A couple derp fixes
- Allocate enough space for byte sizes - Pass size to 'bytes' count - Check lang ini not font path for lang reload - Use 24 hour with 0 instead of space for filename date
This commit is contained in:
parent
52355b98c7
commit
78e9bd9996
@ -33,7 +33,7 @@ std::string RetTimeForFilename()
|
||||
const struct tm *Time = localtime(&raw);
|
||||
|
||||
char tmp[8];
|
||||
strftime(tmp, sizeof(tmp), "%k%M%S", Time);
|
||||
strftime(tmp, sizeof(tmp), "%H%M%S", Time);
|
||||
|
||||
return tmp;
|
||||
}
|
||||
|
||||
@ -64,7 +64,7 @@ static float getTbNumber(u64 bytes) {
|
||||
|
||||
std::string getDriveBytes(u64 bytes)
|
||||
{
|
||||
char buffer[12];
|
||||
char buffer[32];
|
||||
if (bytes < (1024 * 1024))
|
||||
sniprintf(buffer, sizeof(buffer), STR_N_KB.c_str(), (int)bytes >> 10);
|
||||
|
||||
|
||||
@ -22,12 +22,12 @@ bool clipboardOn = false;
|
||||
bool clipboardUsed = false;
|
||||
|
||||
std::string getBytes(int bytes) {
|
||||
char buffer[11];
|
||||
char buffer[32];
|
||||
if (bytes == 1)
|
||||
sniprintf(buffer, sizeof(buffer), STR_1_BYTE.c_str());
|
||||
|
||||
else if (bytes < 1024)
|
||||
sniprintf(buffer, sizeof(buffer), STR_N_BYTES.c_str());
|
||||
sniprintf(buffer, sizeof(buffer), STR_N_BYTES.c_str(), bytes);
|
||||
|
||||
else if (bytes < (1024 * 1024))
|
||||
sniprintf(buffer, sizeof(buffer), STR_N_KB.c_str(), bytes >> 10);
|
||||
|
||||
@ -108,7 +108,7 @@ std::string getString(CIniFile &ini, const std::string &item, const std::string
|
||||
*/
|
||||
void langInit(bool reloading) {
|
||||
// If reloading then don't change if ini not found
|
||||
if(reloading && access(config->fontPath().c_str(), F_OK) != 0)
|
||||
if(reloading && access(config->languageIniPath().c_str(), F_OK) != 0)
|
||||
return;
|
||||
|
||||
CIniFile languageini(config->languageIniPath());
|
||||
|
||||
Loading…
Reference in New Issue
Block a user