Code Search for Developers
 
 
  

main.c from The Open2x Project at Krugle


Show main.c syntax highlighted

/*
 * Copyright (c) 1999, 2000 Greg Haerr <greg@censoft.com>
 *
 * Engine-level Screen, Mouse and Keyboard device driver API's and types
 * 
 * Contents of this file are not for general export
 *
 *                                     fixed by ghc: 2001. 2. 11
 */
#include "gfxdev.h"

#ifdef STANDALONE
//	#define GDEBUG
	#ifdef GDEBUG
   		FILE *dbg;
		#  define gprintf(x...) fprintf(dbg, x)
	#else
		#  define gprintf(x...)
	#endif

	extern int sondisp(void);
#endif

PSD psd;


#ifndef STANDALONE
int osd_plane_open(void)
{
   if((psd = GdOpenScreen()) == NULL)
   {
      printf("Cannot initialise screen\n");
      return -1;
   }
   printf("graphic device initialize done\n");
   printf("screen device open success: pixelvalue = %d\n", sizeof(MWPIXELVAL));
   printf("psd->xres = %d, psd->yres = %d, psd->linelen = %d\n", psd->xres, psd->yres, psd->linelen);


   if( gfx_init_context(psd) < 0) // text disp routine setting
   {
      printf("Cannot initialise text disp routine\n");
      goto DONE;
   }

return 0;

DONE:
   GdCloseScreen(psd);
   return -1;
}

void osd_plane_close(void)
{
	if( psd )
		GdCloseScreen(psd);
}

#endif





See more files for this project here

The Open2x Project

The Open2x project exists to provide an open source resource for the GP2X handheld console based on the MagicEyes MMSP2 processing platform and MP2520F SoC. The project hosts Linux kernel source for the GP2X, boot loader (U-Boot) source and more.

Project homepage: http://www.distant-earth.com/open2x
Programming language(s): Assembly,C,C++
License: other

  Makefile
  fblin16.c
  fblin24.c
  fblin32.c
  fbs.h
  fontdisp.h
  fontout.c
  gfxdev.h
  gfxfontext.c
  gfxfontload.c
  gfxfontout.c
  gfxtype.h
  gulim_96_10_eng.c
  gulim_96_10_han.c
  main.c
  scr_fb.c