summaryrefslogtreecommitdiff
path: root/src/core/hw/lcd.cpp
diff options
context:
space:
mode:
authorGravatar bunnei2014-04-18 17:52:49 -0400
committerGravatar bunnei2014-04-18 17:52:49 -0400
commit958bca606e80110e05d7c142dda3097fddc96503 (patch)
tree576917751444b4dfdb476d040b4e075bde431b7b /src/core/hw/lcd.cpp
parentInit window size from VideoCore. Start changing the default window behavior... (diff)
parentrenamed hw_lcd module to just lcd (diff)
downloadyuzu-958bca606e80110e05d7c142dda3097fddc96503.tar.gz
yuzu-958bca606e80110e05d7c142dda3097fddc96503.tar.xz
yuzu-958bca606e80110e05d7c142dda3097fddc96503.zip
Merge branch 'hle-interface'
Diffstat (limited to 'src/core/hw/lcd.cpp')
-rw-r--r--src/core/hw/lcd.cpp48
1 files changed, 48 insertions, 0 deletions
diff --git a/src/core/hw/lcd.cpp b/src/core/hw/lcd.cpp
new file mode 100644
index 000000000..3013673f8
--- /dev/null
+++ b/src/core/hw/lcd.cpp
@@ -0,0 +1,48 @@
1// Copyright 2014 Citra Emulator Project
2// Licensed under GPLv2
3// Refer to the license.txt file included.
4
5#include "common/common_types.h"
6#include "common/log.h"
7
8#include "core/core.h"
9#include "core/hw/lcd.h"
10
11#include "video_core/video_core.h"
12
13namespace LCD {
14
15static const u32 kFrameTicks = 268123480 / 60; ///< 268MHz / 60 frames per second
16
17u64 g_last_ticks = 0; ///< Last CPU ticks
18
19template <typename T>
20inline void Read(T &var, const u32 addr) {
21}
22
23template <typename T>
24inline void Write(u32 addr, const T data) {
25}
26
27/// Update hardware
28void Update() {
29 u64 current_ticks = Core::g_app_core->GetTicks();
30
31 if ((current_ticks - g_last_ticks) >= kFrameTicks) {
32 g_last_ticks = current_ticks;
33 VideoCore::g_renderer->SwapBuffers();
34 }
35}
36
37/// Initialize hardware
38void Init() {
39 g_last_ticks = Core::g_app_core->GetTicks();
40 NOTICE_LOG(LCD, "initialized OK");
41}
42
43/// Shutdown hardware
44void Shutdown() {
45 NOTICE_LOG(LCD, "shutdown OK");
46}
47
48} // namespace