Skip to content

Commit 4f7b347

Browse files
committed
pfba: fix "FORCE_60HZ" option not always applied
1 parent 5b9a880 commit 4f7b347

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ add_subdirectory(psnes)
3434

3535
# pfba
3636
set(PFBA_VERSION_MAJOR 3)
37-
set(PFBA_VERSION_MINOR 1)
37+
set(PFBA_VERSION_MINOR 3)
3838
add_subdirectory(pfba)

pfba/pfba/uiEmu.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,17 @@ int PFBAGuiEmu::load(RomList::Rom *rom) {
4848
bForce60Hz = getUi()->getConfig()->get(Option::Id::ROM_FORCE_60HZ, true)->getValueBool();
4949
bForce50Hz = getUi()->getConfig()->get(Option::Id::ROM_FORCE_50HZ, true)->getValueBool();
5050
if (bForce60Hz) {
51-
fps = 6000;
51+
nBurnFPS = fps = 6000;
5252
} else if (bForce50Hz) {
53-
fps = 5000;
53+
nBurnFPS = fps = 5000;
5454
} else {
5555
pDriver[nBurnDrvActive]->Init();
5656
fps = nBurnFPS;
5757
pDriver[nBurnDrvActive]->Exit();
5858
}
59-
printf("Emulation rate: %f hz\n", (float) fps / 100);
6059

61-
printf("Init audio device...");
6260
int freq = getUi()->getConfig()->get(Option::Id::ROM_AUDIO_FREQ)->getValueInt();
63-
addAudio(freq, (float) fps / 100);
61+
addAudio(freq, (float) fps / 100.0f);
6462
if (getAudio()->isAvailable()) {
6563
nInterpolation = getUi()->getConfig()->get(Option::Id::ROM_AUDIO_INTERPOLATION)->getValueInt();
6664
nFMInterpolation = getUi()->getConfig()->get(Option::Id::ROM_AUDIO_FMINTERPOLATION)->getValueInt();
@@ -69,7 +67,6 @@ int PFBAGuiEmu::load(RomList::Rom *rom) {
6967
pBurnSoundOut = getAudio()->getBuffer();
7068
}
7169
audio_sync = getUi()->getConfig()->get(Option::Id::ROM_AUDIO_SYNC, true)->getValueBool();
72-
printf("done\n");
7370
///////////
7471
// AUDIO
7572
//////////
@@ -93,7 +90,8 @@ int PFBAGuiEmu::load(RomList::Rom *rom) {
9390
nCurrentFrame = 0;
9491
setFrameDuration(1.0f / ((float) nBurnFPS / 100.0f));
9592
//printf("frame_duration: %f\n", getFrameDuration());
96-
printf("done\n");
93+
printf("FORCE_60HZ: %i, FORCE_50HZ: %i, AUDIO_SYNC: %i, FPS: %f (BURNFPS: %f)\n",
94+
bForce60Hz, bForce50Hz, audio_sync, (float) fps / 100.0f, (float) nBurnFPS / 100.0f);
9795
///////////////
9896
// FBA DRIVER
9997
///////////////

0 commit comments

Comments
 (0)