omap: reserve enough memory for 24bpp modes
[pcsx_rearmed.git] / frontend / plugin_lib.c
index 7110b35..800a1ae 100644 (file)
@@ -86,25 +86,18 @@ int pl_fbdev_set_mode(int w, int h, int bpp)
        else
                pl_fbdev_buf = ret;
 
-       menu_notify_mode_change(w, h);
+       menu_notify_mode_change(w, h, bpp);
 
        return (ret != NULL) ? 0 : -1;
 }
 
 void pl_fbdev_flip(void)
 {
-       /* doing input here because the pad is polled
-        * thousands of times for some reason */
-       int actions[IN_BINDTYPE_COUNT] = { 0, };
-
-       in_update(actions);
-       if (actions[IN_BINDTYPE_EMU] & PEV_MENU)
-               stop = 1;
-       keystate = actions[IN_BINDTYPE_PLAYER12];
-
        flip_cnt++;
-       print_fps();
-       print_cpu_usage();
+       if (g_opts & OPT_SHOWFPS)
+               print_fps();
+       if (g_opts & OPT_SHOWCPU)
+               print_cpu_usage();
 
        // let's flip now
        pl_fbdev_buf = vout_fbdev_flip(layer_fb);
@@ -114,6 +107,16 @@ void pl_fbdev_finish(void)
 {
 }
 
+static void update_input(void)
+{
+       int actions[IN_BINDTYPE_COUNT] = { 0, };
+
+       in_update(actions);
+       if (actions[IN_BINDTYPE_EMU] & PEV_MENU)
+               stop = 1;
+       keystate = actions[IN_BINDTYPE_PLAYER12];
+}
+
 /* called on every vsync */
 void pl_frame_limit(void)
 {
@@ -121,14 +124,19 @@ void pl_frame_limit(void)
        static int oldsec;
        struct timeval tv;
 
+       /* doing input here because the pad is polled
+        * thousands of times per frame for some reason */
+       update_input();
+
        pcnt_end(PCNT_ALL);
        gettimeofday(&tv, 0);
 
        if (tv.tv_sec != oldsec) {
                flips_per_sec = flip_cnt;
                flip_cnt = 0;
-               tick_per_sec = get_cpu_ticks();
                oldsec = tv.tv_sec;
+               if (g_opts & OPT_SHOWCPU)
+                       tick_per_sec = get_cpu_ticks();
        }
 #ifdef PCNT
        static int ya_vsync_count;