add guncon support
[pcsx_rearmed.git] / frontend / plat_omap.c
index b479a66..5939dcb 100644 (file)
@@ -18,6 +18,7 @@
 #include "linux/fbdev.h"
 #include "linux/oshide.h"
 #include "plugin_lib.h"
+#include "pl_gun_ts.h"
 #include "omap.h"
 #include "pandora.h"
 
@@ -30,8 +31,8 @@ struct vout_fbdev *layer_fb;
 
 static int omap_setup_layer_(int fd, int enabled, int x, int y, int w, int h, int first_call)
 {
-       struct omapfb_plane_info pi;
-       struct omapfb_mem_info mi;
+       struct omapfb_plane_info pi = { 0, };
+       struct omapfb_mem_info mi = { 0, };
        int ret;
 
        ret = ioctl(fd, OMAPFB_QUERY_PLANE, &pi);
@@ -80,6 +81,9 @@ static int omap_setup_layer_(int fd, int enabled, int x, int y, int w, int h, in
 
 int omap_enable_layer(int enabled)
 {
+       if (enabled)
+               pl_set_gun_rect(g_layer_x, g_layer_y, g_layer_w, g_layer_h);
+
        return omap_setup_layer_(vout_fbdev_get_fd(layer_fb), enabled,
                g_layer_x, g_layer_y, g_layer_w, g_layer_h, 0);
 }
@@ -169,7 +173,9 @@ void plat_init(void)
        }
        g_menubg_ptr = temp_frame;
 
-       pandora_init();
+       // hmh
+       pandora_rescan_inputs();
+
        return;
 
 fail1: