static void print_cur_config (void *data)
{
   struct android_app *android_app = (struct android_app*)data;
   char lang[2], country[2];
   AConfiguration_getLanguage(android_app->config, lang);
   AConfiguration_getCountry(android_app->config, country);

   RARCH_LOG("Config: mcc=%d mnc=%d lang=%c%c cnt=%c%c orien=%d touch=%d dens=%d "
         "keys=%d nav=%d keysHid=%d navHid=%d sdk=%d size=%d long=%d "
         "modetype=%d modenight=%d\n",
         AConfiguration_getMcc(android_app->config),
         AConfiguration_getMnc(android_app->config),
         lang[0], lang[1], country[0], country[1],
         AConfiguration_getOrientation(android_app->config),
         AConfiguration_getTouchscreen(android_app->config),
         AConfiguration_getDensity(android_app->config),
         AConfiguration_getKeyboard(android_app->config),
         AConfiguration_getNavigation(android_app->config),
         AConfiguration_getKeysHidden(android_app->config),
         AConfiguration_getNavHidden(android_app->config),
         AConfiguration_getSdkVersion(android_app->config),
         AConfiguration_getScreenSize(android_app->config),
         AConfiguration_getScreenLong(android_app->config),
         AConfiguration_getUiModeType(android_app->config),
         AConfiguration_getUiModeNight(android_app->config));
}
void AndroidConfiguration::reloadCacheForToString() {

  AConfiguration* config = mConfiguration.get();

  std::stringstream stream;

  char lang[2], country[2];
  AConfiguration_getLanguage(config, lang);
  AConfiguration_getCountry(config, country);

  stream << "Config: "
         << "mcc="       << AConfiguration_getMcc(config)         << " "
         << "mnc="       << AConfiguration_getMnc(config)         << " "
         << "lang="      << lang[0] << lang[1]                    << " "
         << "cnt="       << country[0] << country[1]              << " "
         << "orien="     << AConfiguration_getOrientation(config) << " "
         << "touch="     << AConfiguration_getTouchscreen(config) << " "
         << "dens="      << AConfiguration_getDensity(config)     << " "
         << "keys="      << AConfiguration_getKeyboard(config)    << " "
         << "nav="       << AConfiguration_getNavigation(config)  << " "
         << "keysHid="   << AConfiguration_getKeysHidden(config)  << " "
         << "navHid="    << AConfiguration_getNavHidden(config)   << " "
         << "sdk="       << AConfiguration_getSdkVersion(config)  << " "
         << "size="      << AConfiguration_getScreenSize(config)  << " "
         << "long="      << AConfiguration_getScreenLong(config)  << " "
         << "modetype="  << AConfiguration_getUiModeType(config)  << " "
         << "modenight=" << AConfiguration_getUiModeNight(config) << ""
         << "\n";
  mCacheForToString = stream.str();
}
示例#3
0
void StAndroidGlue::printConfig() {
    char aLang[3], aCountry[3];
    AConfiguration_getLanguage(myConfig, aLang);
    AConfiguration_getCountry (myConfig, aCountry);
    aLang[2]    = '\0';
    aCountry[2] = '\0';
    ST_DEBUG_LOG("Config:"
               + " mcc="       + AConfiguration_getMcc(myConfig)
               + " mnc="       + AConfiguration_getMnc(myConfig)
               + " lang="      + aLang + " cnt=" + aCountry
               + " orien="     + AConfiguration_getOrientation(myConfig)
               + " touch="     + AConfiguration_getTouchscreen(myConfig)
               + " dens="      + AConfiguration_getDensity    (myConfig)
               + " keys="      + AConfiguration_getKeyboard   (myConfig)
               + " nav="       + AConfiguration_getNavigation (myConfig)
               + " keysHid="   + AConfiguration_getKeysHidden (myConfig)
               + " navHid="    + AConfiguration_getNavHidden  (myConfig)
               + " sdk="       + AConfiguration_getSdkVersion (myConfig)
               + " size="      + AConfiguration_getScreenSize (myConfig)
               + " long="      + AConfiguration_getScreenLong (myConfig)
               + " modetype="  + AConfiguration_getUiModeType (myConfig)
               + " modenight=" + AConfiguration_getUiModeNight(myConfig));
}
示例#4
0
// Configurationを表示する
void displayConfiguration(struct engine* engine) {
    int idx = 0;
    // 画面の向き
    const char orientation_list[][32] = {
        "ORIENTATION_ANY",   // 未定義
        "ORIENTATION_PORT",  // Portrait
        "ORIENTATION_LAND",  // Landcape
        "ORIENTATION_SQUARE" // Square
    };
    // タッチスクリーン
    const char touchscreen_list[][32] = {
        "TOUCHSCREEN_ANY",    // 未定義
        "TOUCHSCREEN_NOTOUCH",// タッチスクリーンではない
        "TOUCHSCREEN_STYLUS", // (廃止)
        "TOUCHSCREEN_FINGER"  // タッチスクリーン
    };
    // キーボード
    const char keyboard_list[][32] = {
        "KEYBOARD_ANY",    // 未定義
        "KEYBOARD_NOKEYS", // キーはない
        "KEYBOARD_QWERTY", // QWERTY配列
        "KEYBOARD_12KEY"   // 12キー
    };
    // ナビゲーション
    const char navigation_list[][32] = {
        "NAVIGATION_ANY",   // 未定義
        "NAVIGATION_NONAV", // なし
        "NAVIGATION_DPAD",  // DPAD
        "NAVIGATION_TRACKBALL", // トラックボール
        "NAVIGATION_WHEEL"  // ホイール
    };
    // ソフトウェアキーボード
    const char keyshidden_list[][32] = {
        "KEYSHIDDEN_ANY", // 未定義
        "KEYSHIDDEN_NO",  // キーボードを隠すことができない
        "KEYSHIDDEN_YES", // キーボードを隠すことができる
        "KEYSHIDDEN_SOFT" // ソフト制御
    };
    // ナビゲーションキーの隠し方
    const char navhidden_list[][32] = {
        "NAVHIDDEN_ANY", // 未定義
        "NAVHIDDEN_NO",  // ナビゲーションキーを隠すことができる
        "NAVHIDDEN_YES"  // ナビゲーションキーを隠すことができない
    };
    // 画面サイズ
    const char screensize_list[][32] = {
        "SCREENSIZE_ANY",    // 未定義
        "SCREENSIZE_SMALL",  // 小さい
        "SCREENSIZE_NORMAL", // 標準
        "SCREENSIZE_LARGE",  // 大きい
        "SCREENSIZE_XLARGE"  // 特大
    };
    // ワイドスクリーンか
    const char screenlong_list[][32] = {
        "SCREENLONG_ANY",  // 未定義
        "SCREENLONG_NO",   // ワイドではない(QVGA,HVGA,VGAなど)
        "SCREENLONG_YES",  // ワイドである(WQVGA,WVGA,FWVGAなど)
    };
    // 接続状態
    const char uimodetype_list[][32] = {
        "UI_MODE_TYPE_ANY",    // 未定義
        "UI_MODE_TYPE_NORMAL", // 標準
        "UI_MODE_TYPE_DESK",   // DeskDocに接続中
        "UI_MODE_TYPE_CAR"     // CarDocに接続中
    };
    // UIモード(夜)タイプ
    const char uimodenight_list[][32] = {
        "UI_MODE_NIGHT_ANY", // 未定義
        "UI_MODE_NIGHT_NO",  // 昼モード
        "UI_MODE_NIGHT_YES"  // 夜モード
    };

    // 言語を取得(2文字が返る)
    char language[3] = { 0 };
    AConfiguration_getLanguage(engine->app->config, language);
    LOGI("Language:%s", language);
    // 国を取得(2文字が返る)
    char country[3] = { 0 };
    AConfiguration_getCountry(engine->app->config, country);
    LOGI("Country:%s", country);
    // 画面の向き
    idx = AConfiguration_getOrientation(engine->app->config);
    LOGI("Orientation:%s", orientation_list[idx]);
    // タッチスクリーン
    idx = AConfiguration_getTouchscreen(engine->app->config);
    LOGI("Touchscreen:%s", touchscreen_list[idx]);
    // 解像度
    int density = AConfiguration_getDensity(engine->app->config);
    LOGI("Density:%d", density);
    // キーボード
    idx = AConfiguration_getKeyboard(engine->app->config);
    LOGI("Keyboard:%s", keyboard_list[idx]);
    // ナビゲーション
    idx = AConfiguration_getNavigation(engine->app->config);
    LOGI("Navigation:%s", keyboard_list[idx]);
    // キーの隠し方
    idx = AConfiguration_getKeysHidden(engine->app->config);
    LOGI("KeysHidden:%s", keyshidden_list[idx]);
    // ナビゲーションキーの隠し方
    idx = AConfiguration_getNavHidden(engine->app->config);
    LOGI("NaviHidden:%s", navhidden_list[idx]);
    // SDK(API)バージョン
    int ver = AConfiguration_getSdkVersion(engine->app->config);
    LOGI("SdkVersion:%d", ver);
    // スクリーンサイズ
    idx = AConfiguration_getScreenSize(engine->app->config);
    LOGI("ScreenSize:%s", screensize_list[idx]);
    // ワイドスクリーンか
    idx = AConfiguration_getScreenLong(engine->app->config);
    LOGI("ScreenLong:%s", screenlong_list[idx]);
    // UIモードタイプ
    idx = AConfiguration_getUiModeType(engine->app->config);
    LOGI("UiModeType:%s", uimodetype_list[idx]);
    // UIモード(夜)タイプ
    idx = AConfiguration_getUiModeNight(engine->app->config);
    LOGI("UiModeNight:%s", uimodenight_list[idx]);
}