hw_lcd.cpp 1008 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. // Copyright 2014 Citra Emulator Project
  2. // Licensed under GPLv2
  3. // Refer to the license.txt file included.
  4. #include "common/common_types.h"
  5. #include "common/log.h"
  6. #include "core/core.h"
  7. #include "core/hw/hw_lcd.h"
  8. #include "video_core/video_core.h"
  9. namespace LCD {
  10. static const u32 kFrameTicks = 268123480 / 60; ///< 268MHz / 60 frames per second
  11. u64 g_last_ticks = 0; ///< Last CPU ticks
  12. template <typename T>
  13. inline void Read(T &var, const u32 addr) {
  14. }
  15. template <typename T>
  16. inline void Write(u32 addr, const T data) {
  17. }
  18. /// Update hardware
  19. void Update() {
  20. u64 current_ticks = Core::g_app_core->GetTicks();
  21. if ((current_ticks - g_last_ticks) >= kFrameTicks) {
  22. g_last_ticks = current_ticks;
  23. VideoCore::g_renderer->SwapBuffers();
  24. }
  25. }
  26. /// Initialize hardware
  27. void Init() {
  28. g_last_ticks = Core::g_app_core->GetTicks();
  29. NOTICE_LOG(LCD, "LCD initialized OK");
  30. }
  31. /// Shutdown hardware
  32. void Shutdown() {
  33. NOTICE_LOG(LCD, "LCD shutdown OK");
  34. }
  35. } // namespace