libretro / libretro-super

Super repo for other libretro projects. Fetches, builds and installs.
MIT License
406 stars 284 forks source link

how one could get player current score? #1608

Closed mowses closed 2 years ago

mowses commented 2 years ago

Does libretro have some kind of hotkey to save/view current highscore? For example: I am playing atari games and want to get current score.

This feature already exists or should be implemented?

mowses commented 2 years ago

I am trying to implementi this feature in file /libretro-stella/src/libretro/StellaLIBRETRO.cxx in the create method as follow:

bool StellaLIBRETRO::create(bool logging)
{
  system_ready = false;

  // build play system
  destroy();

  myOSystem = make_unique<OSystemLIBRETRO>();

  HighScoresManager highScoresManager(myOSystem);  // <<<<<<<<<<<<<< ADDED THIS LINE

  Settings::Options options;
  myOSystem->initialize(options);

but erros at compiling time:

../common/HighScoresManager.hxx:97:41: note:   no known conversion for argument 1 from ‘std::unique_ptr<OSystemLIBRETRO>’ to ‘OSystem&’
   97 |     explicit HighScoresManager(OSystem& osystem);

I know its a c++ thing, but I dont know why this error happens because OSystemLIBRETRO extends from OSystem. Does anyone know how to solve it?

mowses commented 2 years ago

I made my way through it. Just called from libretro.cxx stella.osystem().