From 19150056ed1fab10c48a2fc9241f29357acd27ef Mon Sep 17 00:00:00 2001 From: ferris Date: Tue, 14 May 2013 15:32:39 +0200 Subject: [PATCH] Updated gitignore, removed old/Resource.aps, and updated GLVideoModule to reflect changes in Fgl --- .gitignore | 3 ++- Chip8/Chip8.cpp | 2 +- GLVideoModule.cpp | 6 +++--- GLVideoModule.h | 4 +++- Main.cpp | 1 + old/Resource.aps | Bin 26088 -> 0 bytes 6 files changed, 10 insertions(+), 6 deletions(-) delete mode 100644 old/Resource.aps diff --git a/.gitignore b/.gitignore index 8c567ca..afc8321 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,7 @@ Thumbs.db *.sdf *.opensdf *.ipch +*.aps # Ignore locally installed NuGet packages. .nuget/ @@ -25,4 +26,4 @@ packages/ bin/ obj/ Debug/ -Release/ +Release/ \ No newline at end of file diff --git a/Chip8/Chip8.cpp b/Chip8/Chip8.cpp index 8e65022..bc4027e 100644 --- a/Chip8/Chip8.cpp +++ b/Chip8/Chip8.cpp @@ -60,7 +60,7 @@ void Chip8::Update() { if (!running) return; int t = 16 - (Time::GetCurrent() - timer); - if (t > 0) Threading::Sleep(t); + Threading::Sleep(t > 1 ? t : 1); timer = Time::GetCurrent(); try diff --git a/GLVideoModule.cpp b/GLVideoModule.cpp index af0d5d8..0ac727e 100644 --- a/GLVideoModule.cpp +++ b/GLVideoModule.cpp @@ -2,8 +2,8 @@ GLVideoModule::GLVideoModule(Viewport *viewport) { - this->viewport = viewport; - outputHandle = (HWND)viewport->GetNativeHandle(); + this->viewport = (Win32Viewport *)viewport; + outputHandle = this->viewport->GetHandle(); SetupDC(); rc = wglCreateContext(dc); wglMakeCurrent(dc, rc); @@ -24,7 +24,7 @@ GLVideoModule::~GLVideoModule() void GLVideoModule::SetOutput(int width, int height, const unsigned int *data) { - auto newOutputHandle = (HWND)viewport->GetNativeHandle(); + auto newOutputHandle = viewport->GetHandle(); if (newOutputHandle != outputHandle) { wglMakeCurrent(NULL, NULL); diff --git a/GLVideoModule.h b/GLVideoModule.h index 56dde63..80464ce 100644 --- a/GLVideoModule.h +++ b/GLVideoModule.h @@ -2,10 +2,12 @@ #define __GLVIDEOMODULE_H__ #include "Common.h" +#include #include #include +// TODO: This should be separated. class GLVideoModule : public VideoModule { public: @@ -17,7 +19,7 @@ class GLVideoModule : public VideoModule private: void SetupDC(); - Viewport *viewport; + Win32Viewport *viewport; HWND outputHandle; HDC dc; HGLRC rc; diff --git a/Main.cpp b/Main.cpp index 7bce690..90ecb76 100644 --- a/Main.cpp +++ b/Main.cpp @@ -35,6 +35,7 @@ int Main(const List& arguments) auto fileLoadRomImage = MenuItem::Create("Load ROM Image..."); fileLoadRomImage->Click += [&] () { + // TODO: File filters auto fileName = DialogWindow::OpenFile(window, "Load ROM Image"); if (fileName.Length()) { diff --git a/old/Resource.aps b/old/Resource.aps deleted file mode 100644 index 4e9a239c245cd162c65e000ad56298ddec8cbec8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 26088 zcmd6Q2e=%?mF^J&V{%?H5+aH?-4pH%xo4*5-a(U?aDxyGLJ~*>33S0^lgzUXYoZOd z5sQh&OE6wACKyaKCM_7=;>Bw)VX@cCVr*;-UM%|ke^vKXch5+Kx8L{Pq0! zw#UL5>#PaRRD_l5LPj(%CcGHY(-H4^t0F8QMH1^9effKR*-=WeNRAPW=a=n>QZA9X zG9PK1QkN<|7s;`RITD;b)PGFLzq7`z)EgEQu5+3;(ZkZ^?0xwEza4cMMvc{h@#!@1VCYK}&OFEL=4huTy(-+WMjKx-&TI zBTPq_qW&*(0Mf+&JWPn;0Gt!VY6z?QVYM*6vhRL6PKO&HZ0ZMoUjt$4iqaDEIpj`5 z*b^a#F!arDe)BPWZi&Er`*cBEke2dhBJ7XQS$ExaCpX({vu{25e0sOsa?A2ksdV>jz0QmZ`!nJ>h~_Y>_Yk8 z)mLBb9enV?%TbQMo_zAjSKfQ?y%z=TF=NJzuadXL7F#H}d+f1?$1*ToDwXom>9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