system.h 986 B

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