OSDN Git Service

[UI][Qt] Disk:
authorK.Ohta <whatisthis.sowhat@gmail.com>
Mon, 12 Jan 2015 19:44:04 +0000 (04:44 +0900)
committerK.Ohta <whatisthis.sowhat@gmail.com>
Mon, 12 Jan 2015 19:44:04 +0000 (04:44 +0900)
source/src/qt/common/qt_gldraw.cpp
source/src/qt/common/qt_gldraw.h
source/src/qt/common/qt_input.cpp
source/src/qt/common/qt_main.cpp
source/src/qt/gui/menu_disk.cpp

index 26f9037..6295017 100644 (file)
@@ -351,7 +351,8 @@ void GLDrawClass::paintGL(void)
        nCLPlatformNum = 0;
        nCLDeviceNum = 0;
        bCLInteropGL = false;
-        //bCLDirectMapping = false;
+        keyin_lasttime = SDL_GetTicks();
+    //bCLDirectMapping = false;
 #endif
         this->setFocusPolicy(Qt::StrongFocus);
  }
index 27ef9d3..bca9f6c 100644 (file)
@@ -69,6 +69,7 @@ public:
  signals:
      void update_screenChanged(int tick);
  protected:
+     uint32_t keyin_lasttime;
      void keyReleaseEvent(QKeyEvent *event);
      void keyPressEvent(QKeyEvent *event);
      void initializeGL();
index 9959cf5..2bcdf6e 100644 (file)
@@ -209,6 +209,7 @@ void GLDrawClass::keyPressEvent(QKeyEvent *event)
 {
    int key = event->key();
    quint32 code, sym;
+   
    pushed_mod = event->modifiers();
    emu->key_down(key, false);
 //        AGAR_DebugLog(AGAR_LOG_DEBUG, "Key down. Modifier = %08x", pushed_mod);
index 45ff786..ac40af2 100644 (file)
@@ -668,6 +668,7 @@ int MainLoop(int argc, char *argv[])
          AGAR_DebugLog(AGAR_LOG_DEBUG, "Audio and JOYSTICK subsystem was initialised.");\r
          GuiMain = new QApplication(argc, argv);\r
 \r
+         load_config();\r
          InitInstance(argc, argv);\r
          AGAR_DebugLog(AGAR_LOG_DEBUG, "InitInstance() OK.");\r
 //       if(agDriverSw && AG_UsingSDL(NULL)) {\r
@@ -680,7 +681,6 @@ int MainLoop(int argc, char *argv[])
 //       }\r
   \r
          // load config\r
-         load_config();\r
        // create window\r
 \r
 \r
index 4621c79..d8479b5 100644 (file)
@@ -119,8 +119,8 @@ void Ui_MainWindow::_open_disk(int drv, const QString fname)
    }
    for(i = 0; i < MAX_HISTORY; i++) {
        if(action_Recent_List_FD[drv][i] != NULL) { 
-         action_Recent_List_FD[drv][i]->setText(config.recent_disk_path[drv][i]);
-         //emit actiont_Recent_List_FD[drv][i]->changed();
+         action_Recent_List_FD[drv][i]->setText(QString::fromUtf8(config.recent_disk_path[drv][i]));
+         //actiont_Recent_List_FD[drv][i]->changed();
        }
     }
 
@@ -221,6 +221,7 @@ void Ui_MainWindow::ConfigFloppyMenu(Ui_MainWindow *p)
                action_Recent_List_FD[0][ii] = new Action_Control(p);
                action_Recent_List_FD[0][ii]->binds->setDrive(0);
                action_Recent_List_FD[0][ii]->binds->setNumber(ii);
+               action_Recent_List_FD[0][ii]->setText(QString::fromUtf8(config.recent_disk_path[0][ii]));
                actionGroup_Opened_FD[0]->addAction(action_Recent_List_FD[0][ii]);
                connect(action_Recent_List_FD[0][ii], SIGNAL(triggered()),
                        action_Recent_List_FD[0][ii]->binds, SLOT(on_recent_disk()));
@@ -295,6 +296,7 @@ void Ui_MainWindow::ConfigFloppyMenu(Ui_MainWindow *p)
                action_Recent_List_FD[1][ii] = new Action_Control(p);
                action_Recent_List_FD[1][ii]->binds->setDrive(1);
                action_Recent_List_FD[1][ii]->binds->setNumber(ii);
+               action_Recent_List_FD[1][ii]->setText(QString::fromUtf8(config.recent_disk_path[1][ii]));
                actionGroup_Opened_FD[1]->addAction(action_Recent_List_FD[1][ii]);
                connect(action_Recent_List_FD[1][ii], SIGNAL(triggered()),
                        action_Recent_List_FD[1][ii]->binds, SLOT(on_recent_disk()));