<commit_before>
#include "ofMain.h"
#include "ofApp.h"

#include "ofxJSONElement.h"


int main( ){
  ofxJSONElement json;
  json.open("user.json");
  int w = json["window"]["width"].asInt();
  int h = json["window"]["height"].asInt();
  int f = json["window"]["fullScreen"].asInt();
  int fps = json["window"]["frameLimit"].asInt();
  
  ofSetupOpenGL(w, h, f ? OF_FULLSCREEN : OF_WINDOW);
  ofSetFrameRate(fps);
  
  ofRunApp(new ofApp());
}<commit_msg>入力デバイスの読み込み処理を追加<commit_after>
#include "ofMain.h"
#include "ofApp.h"
#include "ofxJSONElement.h"

#include "input.h"


int main( ){
  ofxJSON json;
  json.open("user.json");
  
  // jsonからウィンドウの初期値を読み込む
  int w = json["Window"]["width"].asInt();
  int h = json["Window"]["height"].asInt();
  bool f = json["Window"]["fullScreen"].asBool();
  int fps = json["Window"]["frameLimit"].asInt();
  
  // 設定されたボタン番号を読み込む
  string path = json["Input"]["path"].asString();
  Input::setup(path);
  
  // 読み込んだ初期値からウィンドウを作成
  ofSetupOpenGL(w, h, f ? OF_FULLSCREEN : OF_WINDOW);
  ofSetFrameRate(fps);
  
  ofRunApp(new ofApp());
}
{'fraction_non_alphanumeric': 0.2011173184357542, 'fraction_numerical': 0.0, 'mean_word_length': 4.718085106382978, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '597734', 'n_tokens_mistral': 454, 'n_tokens_neox': 483, 'n_words': 73}