+
+int host_video_init(int *stride, int no_dblbuf)
+{
+ int ret;
+
+ host_stride = 320 * 2;
+ if (stride != 0)
+ *stride = host_stride;
+
+ ret = vout_gp2x_init(no_dblbuf);
+ if (ret != 0)
+ return ret;
+
+ vout_gp2x_set_mode(16, !no_dblbuf);
+ host_video_flip();
+ return 0;
+}
+
+void host_video_finish(void)
+{
+ vout_gp2x_finish();
+}
+
+void host_video_update_pal16(unsigned short *pal)
+{
+ vout_gp2x_set_palette16(pal, 256);
+}
+
+void host_video_update_pal32(unsigned int *pal)
+{
+ vout_gp2x_set_palette32(pal, 256);
+}
+
+void host_video_change_bpp(int bpp)
+{
+ vout_gp2x_set_mode(bpp, 1);
+}
+
+#ifdef LOADER
+void host_video_blit4(const unsigned char *src, int w, int h, int stride)
+{
+ memcpy(host_screen, src, 320*240/2); // FIXME
+ host_video_flip();
+}
+
+void host_video_blit8(const unsigned char *src, int w, int h, int stride)
+{
+ extern void rotated_blit8(void *dst, const void *linesx4);
+
+ rotated_blit8(host_screen, src);
+ host_video_flip();
+}
+
+void host_video_blit16(const unsigned short *src, int w, int h, int stride)
+{
+ extern void rotated_blit16(void *dst, const void *linesx4);
+
+ rotated_blit16(host_screen, src);
+ host_video_flip();
+}
+#endif // LOADER
+
+#endif // WIZ
+