Renamed gameViewer to ConsoleViewer.
This commit is contained in:
parent
824bdda083
commit
ac43cc3e62
|
@ -295,14 +295,14 @@ SOURCES += src/drivers/common/vidblit.cpp
|
||||||
SOURCES += src/drivers/common/nes_ntsc.c
|
SOURCES += src/drivers/common/nes_ntsc.c
|
||||||
|
|
||||||
HEADERS += src/drivers/Qt/ConsoleWindow.h
|
HEADERS += src/drivers/Qt/ConsoleWindow.h
|
||||||
HEADERS += src/drivers/Qt/GameViewerGL.h
|
HEADERS += src/drivers/Qt/ConsoleViewerGL.h
|
||||||
HEADERS += src/drivers/Qt/GameViewerSDL.h
|
HEADERS += src/drivers/Qt/ConsoleViewerSDL.h
|
||||||
HEADERS += src/drivers/Qt/GamePadConf.h
|
HEADERS += src/drivers/Qt/GamePadConf.h
|
||||||
HEADERS += src/drivers/Qt/ConsoleSoundConf.h
|
HEADERS += src/drivers/Qt/ConsoleSoundConf.h
|
||||||
SOURCES += src/drivers/Qt/main.cpp
|
SOURCES += src/drivers/Qt/main.cpp
|
||||||
SOURCES += src/drivers/Qt/ConsoleWindow.cpp
|
SOURCES += src/drivers/Qt/ConsoleWindow.cpp
|
||||||
SOURCES += src/drivers/Qt/GameViewerGL.cpp
|
SOURCES += src/drivers/Qt/ConsoleViewerGL.cpp
|
||||||
SOURCES += src/drivers/Qt/GameViewerSDL.cpp
|
SOURCES += src/drivers/Qt/ConsoleViewerSDL.cpp
|
||||||
SOURCES += src/drivers/Qt/GamePadConf.cpp
|
SOURCES += src/drivers/Qt/GamePadConf.cpp
|
||||||
SOURCES += src/drivers/Qt/ConsoleSoundConf.cpp
|
SOURCES += src/drivers/Qt/ConsoleSoundConf.cpp
|
||||||
SOURCES += src/drivers/Qt/fceuWrapper.cpp
|
SOURCES += src/drivers/Qt/fceuWrapper.cpp
|
||||||
|
|
|
@ -9,12 +9,12 @@
|
||||||
#include <QScreen>
|
#include <QScreen>
|
||||||
|
|
||||||
#include "Qt/nes_shm.h"
|
#include "Qt/nes_shm.h"
|
||||||
#include "Qt/GameViewerGL.h"
|
#include "Qt/ConsoleViewerGL.h"
|
||||||
|
|
||||||
extern unsigned int gui_draw_area_width;
|
extern unsigned int gui_draw_area_width;
|
||||||
extern unsigned int gui_draw_area_height;
|
extern unsigned int gui_draw_area_height;
|
||||||
|
|
||||||
gameViewGL_t::gameViewGL_t(QWidget *parent)
|
ConsoleViewGL_t::ConsoleViewGL_t(QWidget *parent)
|
||||||
: QOpenGLWidget( parent )
|
: QOpenGLWidget( parent )
|
||||||
{
|
{
|
||||||
view_width = 0;
|
view_width = 0;
|
||||||
|
@ -32,7 +32,7 @@ gameViewGL_t::gameViewGL_t(QWidget *parent)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gameViewGL_t::~gameViewGL_t(void)
|
ConsoleViewGL_t::~ConsoleViewGL_t(void)
|
||||||
{
|
{
|
||||||
// Make sure the context is current and then explicitly
|
// Make sure the context is current and then explicitly
|
||||||
// destroy all underlying OpenGL resources.
|
// destroy all underlying OpenGL resources.
|
||||||
|
@ -49,12 +49,12 @@ gameViewGL_t::~gameViewGL_t(void)
|
||||||
doneCurrent();
|
doneCurrent();
|
||||||
}
|
}
|
||||||
|
|
||||||
int gameViewGL_t::init( void )
|
int ConsoleViewGL_t::init( void )
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void gameViewGL_t::buildTextures(void)
|
void ConsoleViewGL_t::buildTextures(void)
|
||||||
{
|
{
|
||||||
glEnable(GL_TEXTURE_RECTANGLE);
|
glEnable(GL_TEXTURE_RECTANGLE);
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ void gameViewGL_t::buildTextures(void)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void gameViewGL_t::initializeGL(void)
|
void ConsoleViewGL_t::initializeGL(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
initializeOpenGLFunctions();
|
initializeOpenGLFunctions();
|
||||||
|
@ -93,7 +93,7 @@ void gameViewGL_t::initializeGL(void)
|
||||||
buildTextures();
|
buildTextures();
|
||||||
}
|
}
|
||||||
|
|
||||||
void gameViewGL_t::resizeGL(int w, int h)
|
void ConsoleViewGL_t::resizeGL(int w, int h)
|
||||||
{
|
{
|
||||||
w = (int)( devPixRatio * w );
|
w = (int)( devPixRatio * w );
|
||||||
h = (int)( devPixRatio * h );
|
h = (int)( devPixRatio * h );
|
||||||
|
@ -109,7 +109,7 @@ void gameViewGL_t::resizeGL(int w, int h)
|
||||||
buildTextures();
|
buildTextures();
|
||||||
}
|
}
|
||||||
|
|
||||||
void gameViewGL_t::paintGL(void)
|
void ConsoleViewGL_t::paintGL(void)
|
||||||
{
|
{
|
||||||
int texture_width = nes_shm->ncol;
|
int texture_width = nes_shm->ncol;
|
||||||
int texture_height = nes_shm->nrow;
|
int texture_height = nes_shm->nrow;
|
|
@ -6,13 +6,13 @@
|
||||||
#include <QOpenGLWidget>
|
#include <QOpenGLWidget>
|
||||||
#include <QOpenGLFunctions>
|
#include <QOpenGLFunctions>
|
||||||
|
|
||||||
class gameViewGL_t : public QOpenGLWidget, protected QOpenGLFunctions
|
class ConsoleViewGL_t : public QOpenGLWidget, protected QOpenGLFunctions
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
gameViewGL_t(QWidget *parent = 0);
|
ConsoleViewGL_t(QWidget *parent = 0);
|
||||||
~gameViewGL_t(void);
|
~ConsoleViewGL_t(void);
|
||||||
|
|
||||||
int init( void );
|
int init( void );
|
||||||
|
|
|
@ -7,12 +7,12 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "Qt/nes_shm.h"
|
#include "Qt/nes_shm.h"
|
||||||
#include "Qt/GameViewerSDL.h"
|
#include "Qt/ConsoleViewerSDL.h"
|
||||||
|
|
||||||
extern unsigned int gui_draw_area_width;
|
extern unsigned int gui_draw_area_width;
|
||||||
extern unsigned int gui_draw_area_height;
|
extern unsigned int gui_draw_area_height;
|
||||||
|
|
||||||
gameViewSDL_t::gameViewSDL_t(QWidget *parent)
|
ConsoleViewSDL_t::ConsoleViewSDL_t(QWidget *parent)
|
||||||
: QWidget( parent )
|
: QWidget( parent )
|
||||||
{
|
{
|
||||||
view_width = GL_NES_WIDTH;
|
view_width = GL_NES_WIDTH;
|
||||||
|
@ -32,12 +32,12 @@ gameViewSDL_t::gameViewSDL_t(QWidget *parent)
|
||||||
vsyncEnabled = false;
|
vsyncEnabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
gameViewSDL_t::~gameViewSDL_t(void)
|
ConsoleViewSDL_t::~ConsoleViewSDL_t(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int gameViewSDL_t::init(void)
|
int ConsoleViewSDL_t::init(void)
|
||||||
{
|
{
|
||||||
WId windowHandle;
|
WId windowHandle;
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ int gameViewSDL_t::init(void)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void gameViewSDL_t::cleanup(void)
|
void ConsoleViewSDL_t::cleanup(void)
|
||||||
{
|
{
|
||||||
if (sdlTexture)
|
if (sdlTexture)
|
||||||
{
|
{
|
||||||
|
@ -112,7 +112,7 @@ void gameViewSDL_t::cleanup(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void gameViewSDL_t::reset(void)
|
void ConsoleViewSDL_t::reset(void)
|
||||||
{
|
{
|
||||||
cleanup();
|
cleanup();
|
||||||
if ( init() == 0 )
|
if ( init() == 0 )
|
||||||
|
@ -125,7 +125,7 @@ void gameViewSDL_t::reset(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void gameViewSDL_t::resizeEvent(QResizeEvent *event)
|
void ConsoleViewSDL_t::resizeEvent(QResizeEvent *event)
|
||||||
{
|
{
|
||||||
QSize s;
|
QSize s;
|
||||||
|
|
||||||
|
@ -142,7 +142,7 @@ void gameViewSDL_t::resizeEvent(QResizeEvent *event)
|
||||||
sdlViewport.h = view_height;
|
sdlViewport.h = view_height;
|
||||||
}
|
}
|
||||||
|
|
||||||
void gameViewSDL_t::paintEvent( QPaintEvent *event )
|
void ConsoleViewSDL_t::paintEvent( QPaintEvent *event )
|
||||||
{
|
{
|
||||||
int nesWidth = GL_NES_WIDTH;
|
int nesWidth = GL_NES_WIDTH;
|
||||||
int nesHeight = GL_NES_HEIGHT;
|
int nesHeight = GL_NES_HEIGHT;
|
|
@ -8,13 +8,13 @@
|
||||||
#include <QResizeEvent>
|
#include <QResizeEvent>
|
||||||
#include <SDL.h>
|
#include <SDL.h>
|
||||||
|
|
||||||
class gameViewSDL_t : public QWidget
|
class ConsoleViewSDL_t : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
gameViewSDL_t(QWidget *parent = 0);
|
ConsoleViewSDL_t(QWidget *parent = 0);
|
||||||
~gameViewSDL_t(void);
|
~ConsoleViewSDL_t(void);
|
||||||
|
|
||||||
int init(void);
|
int init(void);
|
||||||
void reset(void);
|
void reset(void);
|
|
@ -15,8 +15,8 @@ consoleWin_t::consoleWin_t(QWidget *parent)
|
||||||
|
|
||||||
createMainMenu();
|
createMainMenu();
|
||||||
|
|
||||||
viewport = new gameViewGL_t(this);
|
viewport = new ConsoleViewGL_t(this);
|
||||||
//viewport = new gameViewSDL_t(this);
|
//viewport = new ConsoleViewSDL_t(this);
|
||||||
|
|
||||||
setCentralWidget(viewport);
|
setCentralWidget(viewport);
|
||||||
|
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
#include <QThread>
|
#include <QThread>
|
||||||
#include <QMutex>
|
#include <QMutex>
|
||||||
|
|
||||||
#include "Qt/GameViewerGL.h"
|
#include "Qt/ConsoleViewerGL.h"
|
||||||
#include "Qt/GameViewerSDL.h"
|
#include "Qt/ConsoleViewerSDL.h"
|
||||||
#include "Qt/GamePadConf.h"
|
#include "Qt/GamePadConf.h"
|
||||||
|
|
||||||
class emulatorThread_t : public QThread
|
class emulatorThread_t : public QThread
|
||||||
|
@ -39,8 +39,8 @@ class consoleWin_t : public QMainWindow
|
||||||
consoleWin_t(QWidget *parent = 0);
|
consoleWin_t(QWidget *parent = 0);
|
||||||
~consoleWin_t(void);
|
~consoleWin_t(void);
|
||||||
|
|
||||||
gameViewGL_t *viewport;
|
ConsoleViewGL_t *viewport;
|
||||||
//gameViewSDL_t *viewport;
|
//ConsoleViewSDL_t *viewport;
|
||||||
|
|
||||||
void setCyclePeriodms( int ms );
|
void setCyclePeriodms( int ms );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue