A couple additions and fixes.

This commit is contained in:
dkeruza-neo
2025-05-31 21:45:19 -03:00
parent 4d07faa251
commit f5c8c8c0f0
4 changed files with 33 additions and 5 deletions
+8
View File
@@ -2,8 +2,16 @@
All notable changes to this project will be documented in this file.
## [2.0.14]
### Added
- Bobby's birthday checking!
- FPS target to float.
### Fixed
- a bub in config.c where MJ4_ENABLED_ALL_THE_TIME was using the wrong variable.
## [2.0.13]
### Added
- Clear window when the game is loading to prevent ghosting in SDL
- Prevent the created windows to resize/maximize.
- Version in github now matches the version in the changelog.
+21 -1
View File
@@ -61,6 +61,8 @@ int selectReply = -1;
int jvsFileDescriptor = -1;
int jvsPacketSize = -1;
char serialString[1024] = {0};
int initBaseboard()
{
char *sramPath = getConfig()->sramPath;
@@ -86,6 +88,24 @@ int initBaseboard()
return -1;
}
strcpy(serialString, SERIAL_STRING);
time_t t = time(NULL); // Get current time
struct tm *tm_info = localtime(&t); // Convert to local time structure
int month = tm_info->tm_mon + 1; // tm_mon is 0-based (0 = Jan, 4 = May)
int day = tm_info->tm_mday; // tm_mday is the day of the month
if (month == 1 && day == 18)
{
strcpy(serialString, "HAPPY BIRTHDAY F");
}
if (month == 5 && day == 21)
{
strcpy(serialString, "HAPPY BIRTHDAY B");
}
initJVSSerial(jvsFileDescriptor);
startJVSFrameThread(&jvsFileDescriptor);
}
@@ -236,7 +256,7 @@ int baseboardIoctl(int fd, unsigned int request, void *data)
case BASEBOARD_GET_SERIAL:
{
memcpy(&sharedMemory[serialCommand.destAddress + 96], SERIAL_STRING, strlen(SERIAL_STRING));
memcpy(&sharedMemory[serialCommand.destAddress + 96], serialString, strlen(serialString));
_data[1] = 1; // Set the status to success
}
break;
+3 -3
View File
@@ -1238,7 +1238,7 @@ int readConfig(FILE *configFile, EmulatorConfig *config)
config->fpsLimiter = atoi(getNextToken(NULL, " ", &saveptr));
else if (strcmp(command, "FPS_TARGET") == 0)
config->fpsTarget = atoi(getNextToken(NULL, " ", &saveptr));
config->fpsTarget = atof(getNextToken(NULL, " ", &saveptr));
else if (strcmp(command, "LGJ_RENDER_WITH_MESA") == 0)
config->lgjRenderWithMesa = atoi(getNextToken(NULL, " ", &saveptr));
@@ -1274,7 +1274,7 @@ int readConfig(FILE *configFile, EmulatorConfig *config)
config->phTouchCursorHeight = atoi(getNextToken(NULL, " ", &saveptr));
else if (strcmp(command, "MJ4_ENABLED_ALL_THE_TIME") == 0)
config->phMode = atoi(getNextToken(NULL, " ", &saveptr));
config->mj4EnabledAtT = atoi(getNextToken(NULL, " ", &saveptr));
else if (strcmp(command, "OR2_IP") == 0)
strcpy(config->or2IP, getNextToken(NULL, " ", &saveptr));
@@ -1567,7 +1567,7 @@ int initConfig(const char* configFilePath)
config.jvsIOType = SEGA_TYPE_3;
config.GPUVendor = AUTO_DETECT_GPU;
config.fpsLimiter = 0;
config.fpsTarget = 60;
config.fpsTarget = 60.0f;
config.noSDL = 0;
config.phMode = 2;
config.disableBuiltinFont = 0;
+1 -1
View File
@@ -261,7 +261,7 @@ typedef struct
int hummerFlickerFix;
int keepAspectRatio;
int fpsLimiter;
int fpsTarget;
float fpsTarget;
int lgjRenderWithMesa;
int noSDL;
int phMode;