summaryrefslogtreecommitdiff
path: root/src/core/hw/hw_lcd.cpp
diff options
context:
space:
mode:
authorGravatar bunnei2014-04-08 19:25:03 -0400
committerGravatar bunnei2014-04-08 19:25:03 -0400
commit63e46abdb8764bc97e91bae862c8d461e61b1965 (patch)
treee73f4aa25d7b4015a265e7bbfb6004dab7561027 /src/core/hw/hw_lcd.cpp
parentfixed some license headers that I missed (diff)
downloadyuzu-63e46abdb8764bc97e91bae862c8d461e61b1965.tar.gz
yuzu-63e46abdb8764bc97e91bae862c8d461e61b1965.tar.xz
yuzu-63e46abdb8764bc97e91bae862c8d461e61b1965.zip
got rid of 'src' folders in each sub-project
Diffstat (limited to 'src/core/hw/hw_lcd.cpp')
-rw-r--r--src/core/hw/hw_lcd.cpp45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/core/hw/hw_lcd.cpp b/src/core/hw/hw_lcd.cpp
new file mode 100644
index 000000000..ad346c794
--- /dev/null
+++ b/src/core/hw/hw_lcd.cpp
@@ -0,0 +1,45 @@
1// Copyright 2014 Citra Emulator Project
2// Licensed under GPLv2
3// Refer to the license.txt file included.
4
5#include "log.h"
6#include "core.h"
7#include "hw_lcd.h"
8#include "video_core.h"
9
10namespace LCD {
11
12static const u32 kFrameTicks = 268123480 / 60; ///< 268MHz / 60 frames per second
13
14u64 g_last_ticks = 0; ///< Last CPU ticks
15
16template <typename T>
17inline void Read(T &var, const u32 addr) {
18}
19
20template <typename T>
21inline void Write(u32 addr, const T data) {
22}
23
24/// Update hardware
25void Update() {
26 u64 current_ticks = Core::g_app_core->GetTicks();
27
28 if ((current_ticks - g_last_ticks) >= kFrameTicks) {
29 g_last_ticks = current_ticks;
30 VideoCore::g_renderer->SwapBuffers();
31 }
32}
33
34/// Initialize hardware
35void Init() {
36 g_last_ticks = Core::g_app_core->GetTicks();
37 NOTICE_LOG(LCD, "LCD initialized OK");
38}
39
40/// Shutdown hardware
41void Shutdown() {
42 NOTICE_LOG(LCD, "LCD shutdown OK");
43}
44
45} // namespace