Skip to content

Commit

Permalink
try not using random engine to see if it still crashes
Browse files Browse the repository at this point in the history
  • Loading branch information
pundang committed Jun 26, 2024
1 parent f810a93 commit 581c6c8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <Geode/Geode.hpp>
#include <Geode/modify/GameManager.hpp>
#include <Geode/modify/MenuLayer.hpp>
#include <random>
// #include <random>
#include <vector>

using namespace geode::prelude;
Expand All @@ -30,11 +30,11 @@ Song selectedSong;
}

// select a random item from the vector and return the path
std::random_device rd;
std::mt19937 gen(rd());
std::uniform_int_distribution<> dist(0, songs.size() - 1);
int randomIndex = dist(gen);
selectedSong = songs[randomIndex];
// std::random_device rd;
// std::mt19937 gen(rd());
// std::uniform_int_distribution<> dist(0, songs.size() - 1);
// int randomIndex = dist(gen);
selectedSong = songs[50];
}

struct GameManagerHook : Modify<GameManagerHook, GameManager> {
Expand Down

0 comments on commit 581c6c8

Please sign in to comment.