Subversion Repositories Kolibri OS

Rev

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

Rev 9202 Rev 9211
Line 15... Line 15...
15
static int was_initialized=0;
15
static int was_initialized=0;
Line 16... Line 16...
16
 
16
 
17
static int has_null_cursor=0;
17
static int has_null_cursor=0;
Line 18... Line -...
18
static int null_cursor;
-
 
19
 
-
 
20
inline int get_skinh(void)
-
 
21
{
-
 
22
	int res;
-
 
23
	__asm__ ("int $0x40" : "=a"(res) : "a"(48),"b"(4));
-
 
24
	return res;
-
 
25
}
18
static int null_cursor;
Line 26... Line 19...
26
 
19
 
27
//#define KEEP_OBSOLETE_STYLE3
20
//#define KEEP_OBSOLETE_STYLE3
28
 
21
 
Line 29... Line 22...
29
#ifdef KEEP_OBSOLETE_STYLE3
22
#ifdef KEEP_OBSOLETE_STYLE3
30
static int IsStyle4Available=0;
23
static int IsStyle4Available=0;
31
#endif
24
#endif
32
 
25
 
33
void MenuetOS_SDL_RepaintWnd(void)
26
void MenuetOS_SDL_RepaintWnd(void)
34
{
27
{
35
 __kos__window_redraw(1);
28
 __kos__window_redraw(1);
36
 __kos__define_window(1,1,vm_suf->hidden->win_size_x+9,vm_suf->hidden->win_size_y+get_skinh()+4,
29
 __kos__define_window(1, 1, vm_suf->hidden->win_size_x+9,vm_suf->hidden->win_size_y+__kos__get_skinh()+4,
37
#ifdef KEEP_OBSOLETE_STYLE3
30
#ifdef KEEP_OBSOLETE_STYLE3
Line 98... Line 91...
98
{
91
{
99
 this->hidden->__title=(char *)title;
92
 this->hidden->__title=(char *)title;
100
 if(was_initialized) __asm__("int $0x40"::"a"(71),"b"(1),"c"(title));
93
 if(was_initialized) __asm__("int $0x40"::"a"(71),"b"(1),"c"(title));
101
}
94
}
Line 102... Line -...
102
 
-
 
103
void debug_board_write_byte(const char ch){
-
 
104
    __asm__ __volatile__(
-
 
105
        "int $0x40"
-
 
106
        ::"a"(63), "b"(1), "c"(ch));
-
 
107
}
-
 
108
 
-
 
109
void debug_board_write_str(const char* str){
-
 
110
    while(*str)
-
 
111
        debug_board_write_byte(*str++);
-
 
112
}
-
 
113
 
95
 
114
SDL_Surface * MenuetOS_SetVideoMode(_THIS, SDL_Surface *current, int width, int height, int bpp, Uint32 flags)
96
SDL_Surface * MenuetOS_SetVideoMode(_THIS, SDL_Surface *current, int width, int height, int bpp, Uint32 flags)
115
{
97
{
116
 int ly;
98
 int ly;
117
 char * lx;
99
 char * lx;
Line 121... Line 103...
121
 current->h=height;
103
 current->h=height;
122
 current->pitch=width*(bpp>>3);
104
 current->pitch=width*(bpp>>3);
Line 123... Line 105...
123
 
105
 
124
 char info[100];
106
 char info[100];
125
 sprintf(info, "width = %d, height = %d, pitch = %d, bpp = %d\n", current->w, current->h, current->pitch, bpp);
107
 sprintf(info, "width = %d, height = %d, pitch = %d, bpp = %d\n", current->w, current->h, current->pitch, bpp);
126
 debug_board_write_str(info);
108
 __kos__dbg_write_str(info);
Line 127... Line 109...
127
 // __asm__ __volatile__("int3");
109
 // __asm__ __volatile__("int3");
128
 
110
 
129
 current->pixels=this->hidden->__video_buffer=realloc(this->hidden->__video_buffer,
111
 current->pixels=this->hidden->__video_buffer=realloc(this->hidden->__video_buffer,
Line 136... Line 118...
136
 
118
 
137
 this->UpdateRects=MenuetOS_DirectUpdate;
119
 this->UpdateRects=MenuetOS_DirectUpdate;
138
 this->hidden->win_size_x=width;
120
 this->hidden->win_size_x=width;
139
 this->hidden->win_size_y=height;
121
 this->hidden->win_size_y=height;
-
 
122
 vm_suf=this;
-
 
123
 
140
 vm_suf=this;
124
 
141
 if (was_initialized)
125
 if (was_initialized)
142
 {
126
 {
143
  unsigned newheight = height+get_skinh()+4;
127
  unsigned newheight = height+__kos__get_skinh()+4;
-
 
128
  unsigned newwidth  = width+9;
144
  unsigned newwidth = width+9;
129
 
145
  __asm__("int $0x40"::"a"(67),"b"(-1),"c"(-1),"d"(newwidth),"S"(newheight));
130
  __kos__change_window(-1, -1, newwidth, newheight);
146
 }
131
 }
147
 else
132
 else
148
 {
133
 {
149
   __kos__set_events_mask(0x27);
134
  __kos__set_events_mask(0x27);