[UI][Qt][ABOUT_DIALOG] Maybe improve credit displaying.
//extern USING_FLAGS *using_flags;
-Dlg_AboutCSP::Dlg_AboutCSP(USING_FLAGS *p, QWidget *parent) : QWidget(NULL)
+Dlg_AboutCSP::Dlg_AboutCSP(USING_FLAGS *p, QString rendererString, QWidget *parent) : QWidget(NULL)
{
QByteArray tmps;
QFile f_credits(":/credits.html");
using_flags = p;
// Credits
credits.clear();
- printf("%x\n",parent_widget);
+ renderer = rendererString;
+
+// printf("%x\n",parent_widget);
if(f_credits.open(QIODevice::ReadOnly | QIODevice::Text)) {
tmps = f_credits.readAll();
if(!tmps.isEmpty()) {
if(ni >= 0) {
ns.replace(ni, reps.length(), bs);
}
+ reps = QString::fromUtf8("@@RendererType@@");
+ ni = ns.indexOf(reps);
+ if(ni >= 0) {
+ ns.replace(ni, reps.length(), renderer);
+ }
credits = ns;
}
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QGroupBox>
+#include <QString>
#include "common.h"
QLabel *revarea;
QWidget *BoxTitle;
QVBoxLayout *VBox;
+ QString renderer;
public:
- Dlg_AboutCSP(USING_FLAGS *p, QWidget *parent = 0);
+ Dlg_AboutCSP(USING_FLAGS *p, QString rendererString = QString::fromUtf8(""), QWidget *parent = 0);
~Dlg_AboutCSP();
};
void Ui_MainWindowBase::do_show_about(void)
{
- Dlg_AboutCSP *dlg = new Dlg_AboutCSP(using_flags, static_cast<QWidget *>(this));
+ QString renderStr;
+ if(graphicsView != NULL) {
+ renderStr = graphicsView->getRenderString();
+ }
+ Dlg_AboutCSP *dlg = new Dlg_AboutCSP(using_flags, renderStr, static_cast<QWidget *>(this));
dlg->show();
}
extfunc->resizeGL(draw_width, draw_height);
delay_update = false;
}
- //extfunc->paintGL();
}
emit sig_draw_timing();
SaveToPixmap(); // If save requested, then Save to Pixmap.
if(extfunc == NULL) return false;
return extfunc->is_ready_to_map_vram_texture();
}
+
+QString GLDrawClass::getRenderString()
+{
+ QString s;
+ QString _head;
+ QOpenGLContext *ctx;
+ ctx = context();
+ if(ctx != NULL) {
+ QSurfaceFormat fmt = ctx->format();
+ int major = fmt.majorVersion();
+ int minor = fmt.minorVersion();
+ if(ctx->isOpenGLES()) {
+ _head = QString::fromUtf8("OpenGL ES v");
+ } else {
+ if(fmt.profile() == QSurfaceFormat::CoreProfile) {
+ _head = QString::fromUtf8("OpenGL (Core) v");
+ } else {
+ _head = QString::fromUtf8("OpenGL (Main) v");
+ }
+ }
+ s = QString::fromUtf8("Host: ");
+ s = s + _head + QString::number(major) +
+ QString::fromUtf8(".") + QString::number(minor) + QString::fromUtf8("<BR>");
+ } else {
+ s = QString::fromUtf8("Host: NOT OpenGL <BR>");
+ }
+ return s + render_string;
+}
#include <QColor>
#include <QPixmap>
#include <QString>
+#include <QPair>
class EMU;
class QEvent;
int draw_height;
bool delay_update;
-
+
protected:
bool run_vm;
-
+ QString render_string;
+
void keyReleaseEvent(QKeyEvent *event);
void keyPressEvent(QKeyEvent *event);
void initializeGL();
GLuint get_mapped_buffer_num(int region);
scrntype_t* get_screen_buffer(int y);
+
+ virtual QString getRenderString();
public slots:
void initKeyCode(void);
void releaseKeyCode(void);
if(_glversion.second >= 1) {
extfunc = new GLDraw_ES_2(this, using_flags, csp_logger);
if(extfunc != NULL) {
+ _major_version = 3;
csp_logger->debug_log(CSP_LOG_DEBUG, CSP_LOG_TYPE_GENERAL, "Use OpenGL ES(v3.1) Renderer");
goto _nr_end;
}
(_major_version >= 2)){
extfunc = new GLDraw_ES_2(this, using_flags, csp_logger);
if(extfunc != NULL) {
+ _major_version = 2;
+ _minor_version = 0;
csp_logger->debug_log(CSP_LOG_DEBUG, CSP_LOG_TYPE_GENERAL, "Use OpenGL ES(v2.0) Renderer");
goto _nr_end;
}
((_major_version >= 5) || ((_major_version == 4) && (_minor_version >= 3)))){
extfunc = new GLDraw_4_5(this, using_flags, csp_logger); // ToDo
if(extfunc != NULL) {
+ _major_version = 4;
+ _minor_version = 5;
+ render_type = CONFIG_RENDER_PLATFORM_OPENGL_CORE;
csp_logger->debug_log(CSP_LOG_DEBUG, CSP_LOG_TYPE_GENERAL, "Use OpenGL v4.5(CORE) Renderer");
goto _nr_end;
}
(_major_version >= 3)){
extfunc = new GLDraw_3_0(this, using_flags, csp_logger);
if(extfunc != NULL) {
+ _major_version = 3;
+ _minor_version = 0;
csp_logger->debug_log(CSP_LOG_DEBUG, CSP_LOG_TYPE_GENERAL, "Use OpenGL v3.0 Renderer");
+ render_type = CONFIG_RENDER_PLATFORM_OPENGL_MAIN;
goto _nr_end;
}
}
}
extfunc = new GLDraw_2_0(this, using_flags, csp_logger);
if(extfunc != NULL) {
+ _major_version = 2;
+ _minor_version = 0;
csp_logger->debug_log(CSP_LOG_DEBUG, CSP_LOG_TYPE_GENERAL, "Use OpenGL v2.0 Renderer");
+ render_type = CONFIG_RENDER_PLATFORM_OPENGL_MAIN;
goto _nr_end;
}
}
}
_nr_end:
if(extfunc != NULL) {
+ if((render_type != CONFIG_RENDER_PLATFORM_OPENGL_MAIN) &&
+ (render_type != CONFIG_RENDER_PLATFORM_OPENGL_CORE) &&
+ (render_type != CONFIG_RENDER_PLATFORM_OPENGL_ES)) {
+ render_string = QString::fromUtf8("Emu: Not OpenGL");
+ } else {
+ QString _head;
+ if(render_type == CONFIG_RENDER_PLATFORM_OPENGL_ES) {
+ _head = QString::fromUtf8("OpenGL ES v");
+ } else if(render_type == CONFIG_RENDER_PLATFORM_OPENGL_CORE) {
+ _head = QString::fromUtf8("OpenGL (Core) v");
+ } else {
+ _head = QString::fromUtf8("OpenGL (Main) v");
+ }
+ render_string = QString::fromUtf8("Emu: ") + _head + QString::number(_major_version) +
+ QString::fromUtf8(".") + QString::number(_minor_version) + QString::fromUtf8("<BR>");
+ }
extfunc->initGLObjects();
extfunc->initFBO();
extfunc->initLocalGLObjects();
<body>
<h1>Common Source Code Project</h1>
-<DIV ALIGN=RIGHT><FONT SIZE=3>
+
+<DIV ALIGN=LEFT><FONT SIZE=5>
+<h3>Renderer Type:</h3>
+</DIV>
+<DIV ALIGN=RIGHT><h3>
+@@RendererType@@
+</h3>
+</DIV>
+</FONT>
+
+<DIV ALIGN=RIGHT><FONT SIZE=4>
Upstream Version: 2019-04-30<BR>
Qt Port and FM7 series 2019-10-15<BR>
FFMPEG 4.2 + liblame 3.100 + libx264-158<BR>
@@RevisionString@@
</FONT></DIV>
<BR>
-<DIV ALIGN=RIGHT><FONT SIZE=3>
-<h2>Upstream Author:</h2>
-2006,2015 ©TAKEDA Toshiya<BR>
-<B>HP:</B><BR> <A HREF="http://takeda-toshiya.my.coocan.jp/common/index.html">http://takeda-toshiya.my.coocan.jp/common/index.html</A><BR>
-<h2>Porting to Qt:</h2>
-2015 ©Kyuma Ohta<BR>
-<B>HP1:</B><BR> <A HREF="https://github.com/Artanejp/common_source_project-fm7">https://github.com/Artanejp/common_source_project-fm7</A><BR>
-<B>HP2:</B><BR> <A HREF="https://osdn.jp/projects/csp-qt/">https://osdn.jp/projects/csp-qt/</A><BR>
+<FONT SIZE=4>
+<DIV ALIGN=LEFT>
+<h2>Upstream Author:<BR>
+ 2006,2015,2019 ©TAKEDA Toshiya</h2>
+</DIV>
+<DIV ALIGN=LEFT>
+<B>HP:</B>
+</DIV>
+<DIV ALIGN=RIGHT>
+<A HREF="http://takeda-toshiya.my.coocan.jp/common/index.html">http://takeda-toshiya.my.coocan.jp/common/index.html</A><BR>
+</DIV>
+<DIV ALIGN=LEFT>
+<h2>Porting to Qt: <BR>
+ 2015-2019 ©Kyuma Ohta</h2>
+</DIV>
+</DIV>
+
+<DIV ALIGN=LEFT>
+<B>HP1:</B>
+</DIV>
+<DIV ALIGN=RIGHT>
+<A HREF="https://github.com/Artanejp/common_source_project-fm7">https://github.com/Artanejp/common_source_project-fm7</A>
+</DIV>
+<DIV ALIGN=LEFT>
+<B>HP2:</B>
+</DIV>
+<DIV ALIGN=RIGHT>
+<A HREF="https://osdn.jp/projects/csp-qt/">https://osdn.jp/projects/csp-qt/</A><BR>
<I>E-Mail: whatisthis.sowhat _at_ gmail.com </I><BR>
<I>Twitter: @Artanejp</I><BR>
-<BR>
+</DIV>
+
+<DIV ALIGN=LEFT>
<H2>Thanks to:</h2>
-Ryu Takegami for FM-7/8/77/AV/40/EX<BR>
-<B>HP:</B><BR> <A HREF="http://xm7.la.coocan.jp/xm7/">http://xm7.la.coocan.jp/xm7/</A><BR>
-はせりん for FM-7/8/77/AV/40/EX<BR>
-<B>HP:</B><BR> <A HREF="http://www.mindspring.com/~thasegaw/rpcg/index.html">http://www.mindspring.com/~thasegaw/rpcg/index.html</A><BR>
+</DIV>
+<DIV ALIGN=LEFT>
+<H3>
+- Ryu Takegami for FM-7/8/77/AV/40/EX<BR>
+</H3>
+</DIV>
+<DIV ALIGN=LEFT>
+<B>HP:</B>
+</DIV>
+<DIV ALIGN=RIGHT>
+<A HREF="http://xm7.la.coocan.jp/xm7/">http://xm7.la.coocan.jp/xm7/</A>
+<BR><BR>
+</DIV>
+<DIV ALIGN=LEFT>
+<H3>
+- はせりん for FM-7/8/77/AV/40/EX
+</H3>
+</DIV>
+<DIV ALIGN=LEFT>
+<B>HP:</B>
+</DIV>
+<DIV ALIGN=RIGHT>
+<A HREF="http://www.mindspring.com/~thasegaw/rpcg/index.html">http://www.mindspring.com/~thasegaw/rpcg/index.html</A>
+</DIV>
-<h2>PC-6001 Series , SEGA Master System/Game Gear, MSX1 and MSX2:</h2>
-2015 ©tanam<BR>
-<B>HP:</B><BR> <A HREF="http://www.geocities.jp/parallel_computer_inc/android.html">http://www.geocities.jp/parallel_computer_inc/android.html</A><BR>
+<DIV ALIGN=LEFT>
+<h3>PC-6001 Series , SEGA Master System/Game Gear, MSX1 and MSX2:</h3>
+</DIV>
+<DIV ALIGN=LEFT>
+<h3> 2015 ©tanam</h3>
+</DIV>
+<B>HP:</B>
+</DIV>
+<DIV ALIGN=RIGHT>
+<A HREF="http://www.geocities.jp/parallel_computer_inc/android.html">http://www.geocities.jp/parallel_computer_inc/android.html</A>
+</DIV>
-<h2>MSX1 and MSX2:</h2>
-2015 ©umaiboux<BR>
-<B>HP:</B><BR> <A HREF="http://umaiboux.k-free.net/">http://umaiboux.k-free.net/</A><BR>
+<DIV ALIGN=LEFT>
+<h3>MSX1 and MSX2: <BR> 2015 ©umaiboux</h3>
+</DIV>
+<DIV ALIGN=LEFT>
+<B>HP:</B>
+</DIV>
+<DIV ALIGN=RIGHT>
+<A HREF="http://umaiboux.k-free.net/">http://umaiboux.k-free.net/</A>
+</DIV>
-<h2>MZ-80A:</h2>
-2014,2015 ©hideki suga<BR>
-<B>HP:</B><BR> <A HREF="http://www.ne.jp/asahi/suga/junkyard/">http://www.ne.jp/asahi/suga/junkyard/</A><BR>
+<DIV ALIGN=LEFT>
+<h3>MZ-80A: <BR> 2014,2015 ©hideki suga</h3>
+</DIV>
+<DIV ALIGN=LEFT>
+<B>HP:</B>
+</DIV>
+<DIV ALIGN=RIGHT>
+<A HREF="http://www.ne.jp/asahi/suga/junkyard/">http://www.ne.jp/asahi/suga/junkyard/</A>
+</DIV>
-<h2>Z80 TV Game:</h2>
-2014,2015 ©Isizu<BR>
-<B>HP:</B><BR> <A HREF="http://w01.tp1.jp/~a571632211/index.html">http://w01.tp1.jp/~a571632211/index.html</A><BR>
-<A HREF="http://w01.tp1.jp/~a571632211/z80tvgame/index.html">http://w01.tp1.jp/~a571632211/z80tvgame/index.html</A><BR>
+<DIV ALIGN=LEFT>
+<h3>Z80 TV Game: <BR> 2014,2015 ©Isizu</h3>
+</DIV>
+<DIV ALIGN=LEFT>
+<B>HP:</B>
+</DIV>
+<DIV ALIGN=RIGHT>
+<A HREF="http://w01.tp1.jp/~a571632211/index.html">http://w01.tp1.jp/~a571632211/index.html</A><BR>
+<A HREF="http://w01.tp1.jp/~a571632211/z80tvgame/index.html">http://w01.tp1.jp/~a571632211/z80tvgame/index.html</A>
+</DIV>
-<h2>FM-7/8/77/AV Series:</h2>
-2015 ©Kyuma Ohta<BR>
-<B>HP:</B><BR>
+<DIV ALIGN=LEFT>
+<h3>FM-7/8/77/AV Series: <BR> 2015 ©Kyuma Ohta</h3>
+</DIV>
+<DIV ALIGN=LEFT>
+<B>HP:</B>
+</DIV>
+<DIV ALIGN=RIGHT>
<A HREF="https://osdn.jp/projects/csp-qt/">https://osdn.jp/projects/csp-qt/</A><BR>
+</DIV>
+<DIV ALIGN=LEFT>
<B>Secondary:</B><BR>
+</DIV>
+<DIV ALIGN=RIGHT>
+
<A HREF="https://github.com/Artanejp/common_source_project-fm7">https://github.com/Artanejp/common_source_project-fm7</A><BR>
<BR>
+<I>E-Mail: whatisthis.sowhat _at_ gmail.com </I>
+</DIV>
<BR>
-<I>E-Mail: whatisthis.sowhat _at_ gmail.com </I><BR>
-<BR>
-<BR>
+<DIV ALIGN=LEFT>
<B>All of distributing are published under Gnu Public License version 2.<BR>
You must publish sourcecodes to users of binaries, you must publish changes of source codes to users.<BR>
<BR>
See also:<BR>
-<A HREF="https://www.gnu.org/licenses/gpl-2.0.html">https://www.gnu.org/licenses/gpl-2.0.html</A> .<BR>
+<DIV ALIGN=RIGHT>
+<A HREF="https://www.gnu.org/licenses/gpl-2.0.html">https://www.gnu.org/licenses/gpl-2.0.html</A> .
+</DIV>
+<BR>
</B>
</FONT>
<hr>
+</DIV>
+<DIV ALIGN=RIGHT>
<address></address>
<!-- hhmts start -->Last modified: @@BuildDateAt@@<!-- hhmts end -->
+</DIV>
</body> </html>