system.h 1019 B

1234567891011121314151617181920212223242526272829303132333435
  1. // Copyright 2014 Citra Emulator Project
  2. // Licensed under GPLv2
  3. // Refer to the license.txt file included.
  4. #pragma once
  5. #include "common/emu_window.h"
  6. #include "core/file_sys/meta_file_system.h"
  7. ////////////////////////////////////////////////////////////////////////////////////////////////////
  8. namespace System {
  9. // State of the full emulator
  10. typedef enum {
  11. STATE_NULL = 0, ///< System is in null state, nothing initialized
  12. STATE_IDLE, ///< System is in an initialized state, but not running
  13. STATE_RUNNING, ///< System is running
  14. STATE_LOADING, ///< System is loading a ROM
  15. STATE_HALTED, ///< System is halted (error)
  16. STATE_STALLED, ///< System is stalled (unused)
  17. STATE_DEBUG, ///< System is in a special debug mode (unused)
  18. STATE_DIE ///< System is shutting down
  19. } State;
  20. extern volatile State g_state;
  21. extern MetaFileSystem g_ctr_file_system;
  22. void UpdateState(State state);
  23. void Init(EmuWindow* emu_window);
  24. void RunLoopFor(int cycles);
  25. void RunLoopUntil(u64 global_cycles);
  26. void Shutdown();
  27. };