video_core.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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 <atomic>
  6. #include <memory>
  7. class EmuWindow;
  8. class RendererBase;
  9. ////////////////////////////////////////////////////////////////////////////////////////////////////
  10. // Video Core namespace
  11. namespace VideoCore {
  12. // 3DS Video Constants
  13. // -------------------
  14. // NOTE: The LCDs actually rotate the image 90 degrees when displaying. Because of that the
  15. // framebuffers in video memory are stored in column-major order and rendered sideways, causing
  16. // the widths and heights of the framebuffers read by the LCD to be switched compared to the
  17. // heights and widths of the screens listed here.
  18. static const int kScreenTopWidth = 400; ///< 3DS top screen width
  19. static const int kScreenTopHeight = 240; ///< 3DS top screen height
  20. static const int kScreenBottomWidth = 320; ///< 3DS bottom screen width
  21. static const int kScreenBottomHeight = 240; ///< 3DS bottom screen height
  22. // Video core renderer
  23. // ---------------------
  24. extern std::unique_ptr<RendererBase> g_renderer; ///< Renderer plugin
  25. extern EmuWindow* g_emu_window; ///< Emu window
  26. // TODO: Wrap these in a user settings struct along with any other graphics settings (often set from
  27. // qt ui)
  28. extern std::atomic<bool> g_hw_renderer_enabled;
  29. extern std::atomic<bool> g_shader_jit_enabled;
  30. extern std::atomic<bool> g_toggle_framelimit_enabled;
  31. /// Start the video core
  32. void Start();
  33. /// Initialize the video core
  34. bool Init(EmuWindow* emu_window);
  35. /// Shutdown the video core
  36. void Shutdown();
  37. } // namespace