コード例 #1
0
void LoadCoreWindow::onLoadCustomCoreClicked()
{
   QString path;
   QByteArray pathArray;
   settings_t *settings = config_get_ptr();
   char core_ext[255] = {0};
   char filters[PATH_MAX_LENGTH] = {0};
   const char *pathData = NULL;

   frontend_driver_get_core_extension(core_ext, sizeof(core_ext));

   strlcpy(filters, "Cores (*.", sizeof(filters));
   strlcat(filters, core_ext, sizeof(filters));
   strlcat(filters, ");;All Files (*.*)", sizeof(filters));

   path = QFileDialog::getOpenFileName(this, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_LOAD_CORE), settings->paths.directory_libretro, filters, NULL);

   if (path.isEmpty())
      return;

   pathArray.append(path);
   pathData = pathArray.constData();

   loadCore(pathData);
}
コード例 #2
0
int main()
{
	system("CLS");
	CoreData * userData;
	userData = loadCore();
	intro();
	mainLoop( userData );
	quit();
	return 0;
}
コード例 #3
0
ファイル: Cal3DPlugin.cpp プロジェクト: nixz/covise
void Cal3dCore::eventIn(double timeStamp,
                        const char *eventName,
                        const VrmlField *fieldValue)
{
    if ((strcmp(eventName, "set_modelName") == 0) || (strcmp(eventName, "modelName") == 0))
    {
        loadCore(d_modelName.get());
    }
    else
    {
        VrmlNode::eventIn(timeStamp, eventName, fieldValue);
    }
}
コード例 #4
0
ファイル: Cal3DPlugin.cpp プロジェクト: nixz/covise
void Cal3dCore::setField(const char *fieldName,
                         const VrmlField &fieldValue)
{
    if
        TRY_FIELD(modelName, SFString)
    else if
        TRY_FIELD(modelName, SFString)
    else if
        TRY_FIELD(scale, SFFloat)
    else
        VrmlNodeChild::setField(fieldName, fieldValue);
    if (strcmp("modelName", fieldName) == 0)
    {
        loadCore(d_modelName.get());
    }
}
コード例 #5
0
void LoadCoreWindow::onCoreEnterPressed()
{
   QTableWidgetItem *selectedCoreItem = NULL;
   QString path;
   QByteArray pathArray;
   const char *pathData = NULL;
   QVariantHash hash;

   selectedCoreItem = m_table->item(m_table->currentRow(), CORE_NAME_COLUMN);
   hash = selectedCoreItem->data(Qt::UserRole).toHash();
   path = hash["path"].toString();

   pathArray.append(path);
   pathData = pathArray.constData();

   loadCore(pathData);
}
コード例 #6
0
ファイル: Level.cpp プロジェクト: stevenvi/lander
void Level::load(int level) {
	loadCore(level);
}
コード例 #7
0
ファイル: main.c プロジェクト: QuarkTheAwesome/URetro
int __entry_menu(int argc, char** argv) {
	InitOSFunctionPointers();
	InitVPadFunctionPointers();
	InitFSFunctionPointers();
	mount_sd_fat("sd");
	
	//Setup BATs for later
	InjectSyscall36((unsigned int)injectBAT);
	RunSyscall36();
	
	InstallExceptionHandler();
	
	initInputs();
	
	initVideo();
	videoDebugMessage(0, "All running!");
	
	//*((int*)0x04) = 4243;
	
	unsigned char* MEM2core = 0;
	unsigned int coreSize = 0;
	LoadFileToMem("sd://stella.elf", &MEM2core, &coreSize);

	void* core = (void*)CORES_BASE_ADDRESS;
	
	memcpy(core, MEM2core, coreSize); //Move core to MEM1
	free(MEM2core);
	
	int error = loadCore(core); //Load core symbols (UDynLoad)
	
	char buf[255];
	__os_snprintf(buf, 255, "Core loaded, error %d. Core at 0x%X", error, core);
	videoDebugMessage(1, buf);
	
	unsigned char* game = 0;
	unsigned int gameSize = 0;
	LoadFileToMem("sd://game.bin", &game, &gameSize);
	
	error = setupCore((void*)game, gameSize); //Initialise core
	
	__os_snprintf(buf, 255, "Setup core, error %d, game at %X size %X", error, game, gameSize);
	videoDebugMessage(2, buf);
	
	testVideoOutput();
	
	while (1) {
		pollInputs();
		if (UIInputCheckButton()) {
			break;
		}
	}
	
	
	
	//cleanup
	shutdownVideo();
	memset(core, 0, coreSize); //Delete core from memory or HBL will cry every time
	memset(game, 0, gameSize);
	InjectSyscall36((unsigned int)clearBAT);
	RunSyscall36();
	return 0;
}