-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTCDR.cpp
More file actions
59 lines (51 loc) · 1.2 KB
/
TCDR.cpp
File metadata and controls
59 lines (51 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#include <iostream>
#include "IMemoryInterface.h"
#include "TestOverlay.h"
#include "Global.hpp"
#include <numeric>
#ifdef MEMORY_INTERFACE_BASIC
#include "BasicMemoryInterface.h"
#endif
#ifdef MEMORY_INTERFACE_DRIVER
#include "DriverInterop.h"
#endif
#ifdef MEMORY_INTERFACE_DMA
#include "DMAInterop.hpp"
#endif
#ifdef _DEBUG
using ENTRY_RESULT = int;
#define ENTRY_NAME main
#else
using ENTRY_RESULT = unsigned long;
#define ENTRY_NAME WinMain
#endif
ENTRY_RESULT ENTRY_NAME()
{
try {
#ifdef MEMORY_INTERFACE_BASIC
printf_s("Attempting to use basic memory interface\n");
BasicMemoryInterface basicMemoryInterface{};
Global::pMemoryInterface = &basicMemoryInterface;
#endif
#ifdef MEMORY_INTERFACE_DRIVER
printf_s("Attempting to interop with driver\n");
DriverInterop driverInterop{};
Global::pMemoryInterface = &driverInterop;
#endif
#ifdef MEMORY_INTERFACE_DMA
printf_s("Attempting to use DMA interop\n");
DMAInterop dmaInterop{};
Global::pMemoryInterface = &dmaInterop;
#endif
}
catch (const std::exception& ex) {
printf_s(ex.what());
std::cin.get();
return 1;
}
TestOverlay overlay{"TestOverlay", 60};
while (overlay.IsRunning()) {
overlay.Update();
overlay.Draw();
}
}