Skip to content

Commit

Permalink
Fixed segmentation fault output on Linux build
Browse files Browse the repository at this point in the history
  • Loading branch information
Sargates authored and Sargates committed Aug 15, 2023
1 parent a31f271 commit c61ccfd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
6 changes: 3 additions & 3 deletions src/Application/Core/Controller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,14 @@ public void MainLoop() {
Raylib.EndDrawing();
}

Raylib.CloseWindow();
model.ExitPlayerThreads();
model.JoinPlayerThreads();
Raylib.CloseAudioDevice();
SaveApplicationSettings();

view.Release();
UIHelper.Release();
Raylib.CloseAudioDevice();

Raylib.CloseWindow();
}

public void SaveApplicationSettings() {
Expand Down
4 changes: 0 additions & 4 deletions src/Application/Core/Model.cs
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,5 @@ public void DoubleNextState() {
public void Update() {

}




}
}
6 changes: 3 additions & 3 deletions src/Application/UI/BoardUI/BoardUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,10 @@ static Rectangle GetPieceTextureRect(int pieceType, bool isWhite) { //* Copied f
}

public void Release() {
foreach (Sound sound in BoardUI.sounds) {
Raylib.UnloadSound(sound);
}
Raylib.UnloadTexture(piecesTexture);
}

}


}

0 comments on commit c61ccfd

Please sign in to comment.