rainbow: 'quit' porting and some minor cleanup

git-svn-id: svn://ultimatepp.org/upp/trunk@3674 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
kohait 2011-07-19 08:35:13 +00:00
parent f78397b4ed
commit 60cfcb0e44
7 changed files with 8 additions and 13 deletions

View file

@ -17,8 +17,6 @@
NAMESPACE_UPP
extern bool fbEndSession;
extern int fbfd;
extern struct fb_var_screeninfo vinfo;
extern struct fb_fix_screeninfo finfo;

View file

@ -5,8 +5,6 @@
NAMESPACE_UPP
bool fbEndSession = false;
//video
int fbfd = -1;
struct fb_var_screeninfo vinfo;
@ -27,9 +25,9 @@ int cvt = -1;
//event
int pend = 0;
bool FBEndSession()
bool FBQuitSession()
{
return fbEndSession;
Ctrl::EndSession();
}
bool FBIsWaitingEvent()

View file

@ -134,6 +134,7 @@ void HandleSDLEvent(SDL_Event* event)
case SDL_VIDEOEXPOSE: //SDL_ExposeEvent
break;
case SDL_QUIT: //SDL_QuitEvent
Ctrl::EndSession();
break;
case SDL_USEREVENT: //SDL_UserEvent
HandleUserEvent(event);

View file

@ -8,7 +8,6 @@
NAMESPACE_UPP
extern bool fbEndSession;
extern SDL_Surface * screen;
extern int videoflags;
extern int height;

View file

@ -4,16 +4,17 @@ NAMESPACE_UPP
#define LLOG(x) //LOG(x)
bool fbEndSession = false;
SDL_Surface * screen = NULL;
int videoflags = 0;
int height = 0;
int width = 0;
int bpp = 0;
bool FBEndSession()
void FBQuitSession()
{
return fbEndSession;
SDL_Event event;
event.type=SDL_QUIT;
SDL_PushEvent(&event);
}
bool FBIsWaitingEvent()
@ -72,6 +73,7 @@ void FBUpdate(const Rect& inv)
void FBFlush()
{
}
void FBInit()

View file

@ -5,7 +5,6 @@ NAMESPACE_UPP
#define LLOG(x)
HWND fbHWND;
bool fbEndSession = false;
bool FBIsWaitingEvent()
{

View file

@ -5,8 +5,6 @@
NAMESPACE_UPP
extern bool fbEndSession;
LRESULT CALLBACK fbWindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
void fbUpdate(HDC hdc, const Rect& r);