Subversion Repositories Kolibri OS

Rev

Rev 8218 | Rev 9769 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8218 Rev 9561
Line 112... Line 112...
112
#ifdef HAVE_OPENGL
112
#ifdef HAVE_OPENGL
113
static int lock_count = 0;
113
static int lock_count = 0;
114
#endif
114
#endif
Line -... Line 115...
-
 
115
 
-
 
116
 
-
 
117
typedef union{
-
 
118
    unsigned val;
-
 
119
    struct{
-
 
120
        short  x;
-
 
121
        short  y;
-
 
122
    };
-
 
123
}ksys_pos_t;
-
 
124
 
-
 
125
static inline
-
 
126
ksys_pos_t _ksys_screen_size()
-
 
127
{
-
 
128
	ksys_pos_t size;
-
 
129
    ksys_pos_t size_tmp;
-
 
130
    __asm__ __volatile__(
-
 
131
        "int $0x40"
-
 
132
        :"=a"(size_tmp)
-
 
133
        :"a"(14)
-
 
134
        :"memory"
-
 
135
    );
-
 
136
    size.x = size_tmp.y;
-
 
137
    size.y = size_tmp.x; 
-
 
138
    return size;
-
 
139
}
115
 
140
 
116
 
141
 
117
/*
142
/*
118
 * Initialize the video and event subsystems -- determine native pixel format
143
 * Initialize the video and event subsystems -- determine native pixel format
119
 */
144
 */
Line 233... Line 258...
233
				 0, vf->palette->ncolors, vf->palette->colors);
258
				 0, vf->palette->ncolors, vf->palette->colors);
234
	}
259
	}
235
#endif
260
#endif
236
	video->info.vfmt = SDL_VideoSurface->format;
261
	video->info.vfmt = SDL_VideoSurface->format;
Line -... Line 262...
-
 
262
	
-
 
263
	ksys_pos_t screen_s = _ksys_screen_size();
-
 
264
	video->info.current_h = screen_s.y;
-
 
265
	video->info.current_w = screen_s.x;
237
 
266
 
238
	/* Start the event loop */
267
	/* Start the event loop */
239
	if ( SDL_StartEventLoop(flags) < 0 ) {
268
	if ( SDL_StartEventLoop(flags) < 0 ) {
240
		SDL_VideoQuit();
269
		SDL_VideoQuit();
241
		return(-1);
270
		return(-1);