mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-02-24 05:31:15 +00:00
Test with max users instead, for some reason it's not getting the same value
This commit is contained in:
parent
9bb97e42e0
commit
f3389bbd42
@ -22,12 +22,15 @@
|
||||
|
||||
QObject *topLevel;
|
||||
|
||||
int Wimp::CreateMainWindow()
|
||||
static settings_t *settings;
|
||||
|
||||
int Wimp::CreateMainWindow(char* windowTitle)
|
||||
{
|
||||
QQmlApplicationEngine engine;
|
||||
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
|
||||
topLevel = engine.rootObjects().value(0);
|
||||
window = qobject_cast<QQuickWindow *>(topLevel);
|
||||
SetTitle(windowTitle);
|
||||
|
||||
return this->exec();
|
||||
}
|
||||
@ -38,10 +41,10 @@ void Wimp::SetTitle(char* title)
|
||||
window->setTitle(title);
|
||||
}
|
||||
|
||||
void Wimp::ConfigGetPtr(settings_t *settings)
|
||||
void Wimp::ConfigGetPtr(settings_t *g_config)
|
||||
{
|
||||
this->settings = settings;
|
||||
/* Test, print the video driver name to check if we got the settings data succesfully */
|
||||
printf("Video Driver: %s\n",settings->video.driver);
|
||||
settings = g_config;
|
||||
/* test print the value of max users to compare with the value in RA */
|
||||
printf("Max Users: %d\n",g_config->input.max_users);
|
||||
fflush(stdout);
|
||||
}
|
||||
|
@ -26,14 +26,13 @@
|
||||
class WIMPSHARED_EXPORT Wimp : public QGuiApplication
|
||||
{
|
||||
QQuickWindow *window;
|
||||
settings_t *settings;
|
||||
|
||||
Q_OBJECT
|
||||
public:
|
||||
Wimp(int argc, char *argv[]): QGuiApplication(argc, argv) {}
|
||||
int CreateMainWindow();
|
||||
int CreateMainWindow(char* windowTitle);
|
||||
void SetTitle(char* title);
|
||||
void ConfigGetPtr(settings_t* settings);
|
||||
void ConfigGetPtr(settings_t *g_config);
|
||||
|
||||
};
|
||||
|
||||
|
@ -29,19 +29,14 @@ Wimp* ctrWimp(int argc, char *argv[]){
|
||||
return new Wimp(argc,argv);
|
||||
}
|
||||
|
||||
int CreateMainWindow(Wimp* p)
|
||||
int CreateMainWindow(Wimp* p, char* windowTitle)
|
||||
{
|
||||
return p->CreateMainWindow();
|
||||
return p->CreateMainWindow(windowTitle);
|
||||
}
|
||||
|
||||
void SetTitle(Wimp*p, char* title)
|
||||
void ConfigGetPtr(Wimp*p, settings_t *g_config)
|
||||
{
|
||||
return p->SetTitle(title);
|
||||
}
|
||||
|
||||
void ConfigGetPtr(Wimp*p, settings_t *settings)
|
||||
{
|
||||
return p->ConfigGetPtr(settings);
|
||||
return p->ConfigGetPtr(g_config);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -26,9 +26,8 @@ typedef struct Wimp Wimp;
|
||||
|
||||
Wimp* ctrWimp(int argc, char *argv[]);
|
||||
|
||||
int CreateMainWindow(Wimp* p);
|
||||
void SetTitle(Wimp* p, char* title);
|
||||
void ConfigGetPtr(Wimp*p, settings_t *settings);
|
||||
int CreateMainWindow(Wimp* p, char* windowTitle);
|
||||
void ConfigGetPtr(Wimp*p, settings_t *g_config);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -18,6 +18,8 @@
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "general.h"
|
||||
#include "system.h"
|
||||
|
||||
#include <file/file_path.h>
|
||||
#include <rthreads/rthreads.h>
|
||||
@ -38,11 +40,18 @@ typedef struct ui_companion_qt
|
||||
|
||||
static void qt_thread(void *data)
|
||||
{
|
||||
|
||||
settings_t *settings = config_get_ptr();
|
||||
/* test print the value of max users to compare with the value in QT */
|
||||
RARCH_LOG("Max Users: %d\n", settings->input.max_users);
|
||||
|
||||
ui_companion_qt_t *handle = (ui_companion_qt_t*)data;
|
||||
wimp = ctrWimp(0, NULL);
|
||||
ConfigGetPtr(wimp,config_get_ptr());
|
||||
if(wimp)
|
||||
CreateMainWindow(wimp);
|
||||
{
|
||||
ConfigGetPtr(wimp, settings);
|
||||
CreateMainWindow(wimp, "RetroArch QT");
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
@ -63,9 +72,6 @@ static void ui_companion_qt_deinit(void *data)
|
||||
static void *ui_companion_qt_init(void)
|
||||
{
|
||||
ui_companion_qt_t *handle = (ui_companion_qt_t*)calloc(1, sizeof(*handle));
|
||||
fflush(stdout);
|
||||
|
||||
|
||||
if (!handle)
|
||||
return NULL;
|
||||
|
||||
@ -85,7 +91,6 @@ static int ui_companion_qt_iterate(void *data, unsigned action)
|
||||
{
|
||||
(void)data;
|
||||
(void)action;
|
||||
fflush(stdout);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user