void RetroArch::initRASettings()
{
   strlcpy(g_settings.libretro,(char *)core.toAscii().constData(), sizeof(g_settings.libretro));
   strlcpy(g_extern.fullpath, (char *)rom.toAscii().constData(), sizeof(g_extern.fullpath));

   HardwareInfo *hwInfo = new HardwareInfo();

   if(!hwInfo->isPhysicalKeyboardDevice())
      strlcpy(g_settings.input.overlay, GET_CORE_INFO(coreSelectedIndex, "default_overlay").toAscii().constData(), sizeof(g_settings.input.overlay));
}
Esempio n. 2
0
void RetroArch::initRASettings()
{
    HardwareInfo *hwInfo;

    strlcpy(g_settings.libretro,(char *)core.toAscii().constData(), sizeof(g_settings.libretro));
    strlcpy(g_extern.fullpath, (char *)content.toAscii().constData(), sizeof(g_extern.fullpath));

    hwInfo = new HardwareInfo();

    //If Physical keyboard or a device mapped to player 1, hide overlay
    //TODO: Should there be a minimized/quick settings only overlay?
    if(hwInfo->isPhysicalKeyboardDevice() || port_device[0])
        *g_settings.input.overlay = '\0';
}
void RetroArch::initRASettings()
{
   strlcpy(g_settings.libretro,(char *)core.toAscii().constData(), sizeof(g_settings.libretro));
   strlcpy(g_extern.fullpath, (char *)rom.toAscii().constData(), sizeof(g_extern.fullpath));

   HardwareInfo *hwInfo = new HardwareInfo();

   //If Physical keyboard or a device mapped to player 1, hide overlay
   //TODO: Should there be a minimized/quick settings only overlay?
   if(!hwInfo->isPhysicalKeyboardDevice() && !port_device[0])
      strlcpy(g_settings.input.overlay, GET_CORE_INFO(coreSelectedIndex, "default_overlay").toAscii().constData(), sizeof(g_settings.input.overlay));
   else
      *g_settings.input.overlay = '\0';
}
Esempio n. 4
0
void LinphoneManager::createAndStartLinphoneCore()
{
    char* linphoneRC = strdup(moveLinphoneRcToRWFolder().toUtf8().data());
    LpConfig *lpc = lp_config_new(linphoneRC);

    QString logsPath = QDir::homePath();
    linphone_core_set_log_collection_path(logsPath.toUtf8().constData());
    if (lp_config_get_int(lpc, "app", "log_collection", 0) == 1) {
        linphone_core_enable_log_collection(LinphoneLogCollectionEnabled);
    }

    bool debugEnabled = lp_config_get_int(lpc, "app", "debug", 0) == 1;
    OrtpLogLevel logLevel = static_cast<OrtpLogLevel>(ORTP_LOGLEV_END);
    if (debugEnabled) {
        logLevel = static_cast<OrtpLogLevel>(ORTP_MESSAGE | ORTP_WARNING | ORTP_FATAL | ORTP_ERROR);
    }
    linphone_core_set_log_level_mask(logLevel);

    LinphoneCoreVTable *vtable = (LinphoneCoreVTable*) malloc(sizeof(LinphoneCoreVTable));
    memset (vtable, 0, sizeof(LinphoneCoreVTable));
    vtable->global_state_changed = global_state_changed;
    vtable->registration_state_changed = registration_state_changed;
    vtable->call_state_changed = call_state_changed;
    vtable->message_received = message_received;
    vtable->is_composing_received = composing_received;
    vtable->call_encryption_changed = call_encryption_changed;

    _lc = linphone_core_new(vtable, linphoneRC, "app/native/assets/linphone/factory", this);

    linphone_core_migrate_to_multi_transport(_lc);
    linphone_core_set_user_agent(_lc, "Linphone BB10", _app->applicationVersion().toUtf8().constData());
    linphone_core_set_network_reachable(_lc, true);

    const HardwareInfo hi;
    ms_set_cpu_count(hi.processorCount());

    linphone_core_set_ring(_lc, "app/native/assets/sounds/oldphone_mono.wav");

    QString chatMessagesDatabase = QDir::homePath() + "/chat.db";
    linphone_core_set_chat_database_path(_lc, strdup(chatMessagesDatabase.toUtf8().constData()));
    QString historyLogsDatabase = QDir::homePath() + "/history.db";
    linphone_core_set_call_logs_database_path(_lc, strdup(historyLogsDatabase.toUtf8().constData()));

    QString zrtpCache = QDir::homePath() + "/zrtp_secrets";
    linphone_core_set_zrtp_secrets_file(_lc, strdup(zrtpCache.toUtf8().constData()));

    updateUnreadChatMessagesCount();
    startLinphoneCoreIterate();
}
Esempio n. 5
0
HardwareInfo getHardwareInfo() {
	// 2715 1527
	// 905 509  fac(3)
	int resx, resy, aspx, aspy, fac;
	resx = 1920;
	resy = 1080;
	fac = calcBiggestMulti(resx,resy);
	aspx = resx / fac;
	aspy = resy / fac;



	HardwareInfo info;

	info.update();

	return info;
}