Skip to content

Commit

Permalink
Updated gitignore, removed old/Resource.aps, and updated GLVideoModul…
Browse files Browse the repository at this point in the history
…e to reflect changes in Fgl
  • Loading branch information
ferris committed May 14, 2013
1 parent d6d70e0 commit 1915005
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Thumbs.db
*.sdf
*.opensdf
*.ipch
*.aps

# Ignore locally installed NuGet packages.
.nuget/
Expand All @@ -25,4 +26,4 @@ packages/
bin/
obj/
Debug/
Release/
Release/
2 changes: 1 addition & 1 deletion Chip8/Chip8.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions GLVideoModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down
4 changes: 3 additions & 1 deletion GLVideoModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
#define __GLVIDEOMODULE_H__

#include "Common.h"
#include <Fgl/Win32Viewport.h>

#include <Windows.h>
#include <gl/GL.h>

// TODO: This should be separated.
class GLVideoModule : public VideoModule
{
public:
Expand All @@ -17,7 +19,7 @@ class GLVideoModule : public VideoModule
private:
void SetupDC();

Viewport *viewport;
Win32Viewport *viewport;
HWND outputHandle;
HDC dc;
HGLRC rc;
Expand Down
1 change: 1 addition & 0 deletions Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ int Main(const List<String>& arguments)
auto fileLoadRomImage = MenuItem::Create("Load ROM Image...");
fileLoadRomImage->Click += [&] ()
{
// TODO: File filters
auto fileName = DialogWindow::OpenFile(window, "Load ROM Image");
if (fileName.Length())
{
Expand Down
Binary file removed old/Resource.aps
Binary file not shown.

0 comments on commit 1915005

Please sign in to comment.