diff --git a/snes/interface/interface.cpp b/snes/interface/interface.cpp index dcaa9da..ce55a6c 100644 --- a/snes/interface/interface.cpp +++ b/snes/interface/interface.cpp @@ -22,4 +22,8 @@ time_t Interface::currentTime() { return time(0); } +time_t Interface::randomSeed() { + return time(0); +} + } diff --git a/snes/interface/interface.hpp b/snes/interface/interface.hpp index 42de597..93d1969 100644 --- a/snes/interface/interface.hpp +++ b/snes/interface/interface.hpp @@ -6,6 +6,7 @@ struct Interface { virtual string path(Cartridge::Slot::e slot, const string &hint) = 0; virtual void message(const string &text); virtual time_t currentTime(); + virtual time_t randomSeed(); }; extern Interface *interface; diff --git a/snes/system/system.cpp b/snes/system/system.cpp index 23cff30..48f4af9 100755 --- a/snes/system/system.cpp +++ b/snes/system/system.cpp @@ -147,7 +147,7 @@ void System::unload() { } void System::power() { - random.seed((unsigned)time(0)); + random.seed((unsigned)interface->randomSeed()); region = config.region; expansion = config.expansion_port;