Merge branch 'k4zmu2a:master' into master

This commit is contained in:
toxie 2021-10-18 09:13:17 +02:00 committed by GitHub
commit 08e922c258
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 22 additions and 16 deletions

View File

@ -13,13 +13,14 @@ Supports data files from Windows and Full Tilt versions of the game.
## Known source ports
| Platform | Author | URL |
| --------------- | --------- | ---------------------------------------------------------------------------------------------------------- |
| PS Vita | Axiom | <https://github.com/suicvne/SpaceCadetPinball_Vita> |
| Emscripten | alula | <https://github.com/alula/SpaceCadetPinball> <br> Play online: <https://alula.github.io/SpaceCadetPinball> |
| Nintendo Switch | averne | <https://github.com/averne/SpaceCadetPinball-NX> |
| webOS TV | mariotaku | <https://github.com/webosbrew/SpaceCadetPinball> |
| Android (WIP) | Iscle | https://github.com/Iscle/SpaceCadetPinball |
| Platform | Author | URL |
| ------------------ | ---------- | ---------------------------------------------------------------------------------------------------------- |
| PS Vita | Axiom | <https://github.com/suicvne/SpaceCadetPinball_Vita> |
| Emscripten | alula | <https://github.com/alula/SpaceCadetPinball> <br> Play online: <https://alula.github.io/SpaceCadetPinball> |
| Nintendo Switch | averne | <https://github.com/averne/SpaceCadetPinball-NX> |
| webOS TV | mariotaku | <https://github.com/webosbrew/SpaceCadetPinball> |
| Android (WIP) | Iscle | https://github.com/Iscle/SpaceCadetPinball |
| Nintendo Wii (WIP) | MaikelChan | https://github.com/MaikelChan/SpaceCadetPinball |
Platforms covered by this project: desktop Windows, Linux and macOS.

View File

@ -1019,7 +1019,7 @@ void control::LaunchRampControl(int code, TPinballComponent* caller)
{
sound = control_soundwave21_tag.Component;
}
else if (someFlag <= 1 || someFlag > 3)
else if (someFlag < 1 || someFlag > 3)
{
sound = control_soundwave24_tag.Component;
}
@ -2148,7 +2148,7 @@ void control::HyperspaceKickOutControl(int code, TPinballComponent* caller)
}
else
{
if (someFlag <= 1 || someFlag > 3)
if (someFlag < 1 || someFlag > 3)
{
auto duration = control_soundwave41_tag.Component->Play();
control_soundwave36_1_tag.Component->Play();
@ -2919,7 +2919,7 @@ void control::GameoverController(int code, TPinballComponent* caller)
if (missionMsg & 0x200)
{
int highscoreId = missionMsg % 4;
int highscoreId = missionMsg % 5;
int highScore = pb::highscore_table[highscoreId].Score;
auto nextHidhscoreId = highscoreId + 1;
if (highScore > 0)

View File

@ -57,10 +57,11 @@ int fullscrn::enableFullscreen()
{
if (!display_changed)
{
SDL_SetWindowFullscreen(winmain::MainWindow, SDL_WINDOW_FULLSCREEN_DESKTOP);
display_changed = 1;
if (display_changed)
if (SDL_SetWindowFullscreen(winmain::MainWindow, SDL_WINDOW_FULLSCREEN_DESKTOP) == 0)
{
display_changed = 1;
return 1;
}
}
return 0;
}
@ -69,8 +70,8 @@ int fullscrn::disableFullscreen()
{
if (display_changed)
{
SDL_SetWindowFullscreen(winmain::MainWindow, 0);
display_changed = 0;
if (SDL_SetWindowFullscreen(winmain::MainWindow, 0) == 0)
display_changed = 0;
}
return 0;

View File

@ -316,7 +316,11 @@ std::vector<uint8_t>* midi::MdsToMidi(std::string file)
while (false);
delete[] fileBuf;
if (returnCode && midiOut)
if (returnCode && midiOut)
{
delete midiOut;
midiOut = nullptr;
}
return midiOut;
}