Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 3333 → Rev 3334

/programs/media/Fplay/pixlib2.c
64,17 → 64,6
};
}hwcaps_t;
 
static inline uint32_t GetScreenSize()
{
uint32_t retval;
 
__asm__ __volatile__(
"int $0x40"
:"=a"(retval)
:"a"(61), "b"(1));
return retval;
}
 
static uint32_t get_service(char *name)
{
uint32_t retval = 0;
/programs/media/Fplay/video.c
403,6 → 403,8
// sys_time*10, frames[vfx].pts, ctime, fdelay);
 
main_render->draw(main_render, &frames[vfx].picture);
if(main_render->win->win_state != FULLSCREEN)
{
prg->current = frames[vfx].pts*1000;
// printf("current %f\n", prg->current);
lvl->current = vfx & 1 ? sound_level_1 : sound_level_0;
411,6 → 413,7
if(main_render->win->panel.layout)
send_message(&lvl->ctrl, MSG_PAINT, 0, 0);
}
frames_count--;
frames[vfx].ready = 0;
707,8 → 710,11
uint8_t state;
 
right = win->w;
bottom = win->h-CAPTION_HEIGHT-PANEL_HEIGHT;
bottom = win->h;
 
if(win->win_state != FULLSCREEN)
bottom-= CAPTION_HEIGHT+PANEL_HEIGHT;
// printf("window width %d height %d\n",
// right, bottom);
 
724,6 → 730,8
bottom == render->win_height)
return;
 
printf("%s r: %d b: %d\n", __FUNCTION__, right, bottom);
new_w = bottom*render->ctx_width/render->ctx_height;
new_h = right*render->ctx_height/render->ctx_width;
 
738,8 → 746,8
new_w = bottom*render->ctx_width/render->ctx_height;
};
 
render->win_width = win->w;
render->win_height = win->h-CAPTION_HEIGHT-PANEL_HEIGHT;
render->win_width = right;
render->win_height = bottom;
render_set_size(render, new_w, new_h);
 
if(render->caps & HW_TEX_BLIT) /* hw scaler */
815,6 → 823,10
picture->linesize, 0, render->ctx_height, data, linesize);
// printf("sws_scale\n");
 
if(render->win->win_state == FULLSCREEN)
blit_bitmap(bitmap,render->rcvideo.l,render->rcvideo.t,
render->rcvideo.r, render->rcvideo.b);
else
blit_bitmap(bitmap, render->rcvideo.l,
CAPTION_HEIGHT+render->rcvideo.t,
render->rcvideo.r, render->rcvideo.b);
863,17 → 875,28
sws_scale(cvt_ctx, (const uint8_t* const *)picture->data,
picture->linesize, 0, render->ctx_height, data, linesize);
 
if(render->win->win_state == FULLSCREEN)
blit_bitmap(&render->bitmap[0],render->rcvideo.l,render->rcvideo.t,
render->rcvideo.r, render->rcvideo.b);
else
blit_bitmap(&render->bitmap[0], render->rcvideo.l,
render->rcvideo.t+CAPTION_HEIGHT,
CAPTION_HEIGHT+render->rcvideo.t,
render->rcvideo.r, render->rcvideo.b);
render->last_bitmap = &render->bitmap[0];
}
 
void render_draw_client(render_t *render)
{
int y;
if(render->win_state == MINIMIZED ||
render->win_state == ROLLED)
return;
if(render->win_state == FULLSCREEN)
y = 0;
else
y = CAPTION_HEIGHT;
 
if(player_state == PAUSE)
{
880,26 → 903,26
if(frames[vfx].ready == 1 )
main_render->draw(main_render, &frames[vfx].picture);
else
draw_bar(0, CAPTION_HEIGHT, render->win_width,
draw_bar(0, y, render->win_width,
render->rcvideo.b, 0);
}
else if( player_state == STOP )
{
draw_bar(0, CAPTION_HEIGHT, render->win_width,
draw_bar(0,y, render->win_width,
render->rcvideo.b, 0);
};
 
if(render->layout & HAS_TOP)
draw_bar(0, CAPTION_HEIGHT, render->win_width,
draw_bar(0, y, render->win_width,
render->rctop.b, 0);
if(render->layout & HAS_LEFT)
draw_bar(0, render->rcvideo.t+CAPTION_HEIGHT, render->rcleft.r,
draw_bar(0, render->rcvideo.t+y, render->rcleft.r,
render->rcvideo.b, 0);
if(render->layout & HAS_RIGHT)
draw_bar(render->rcright.l, render->rcvideo.t+CAPTION_HEIGHT,
draw_bar(render->rcright.l, render->rcvideo.t+y,
render->rcright.r, render->rcvideo.b, 0);
if(render->layout & HAS_BOTTOM)
draw_bar(0, render->rcbottom.t+CAPTION_HEIGHT,
draw_bar(0, render->rcbottom.t+y,
render->win_width, render->rcbottom.b, 0);
}
 
/programs/media/Fplay/winlib/caption.c
1,5 → 1,5
 
#include "system.h"
#include <system.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
77,7 → 77,7
btn->img_hilite = res_minimize_btn_hl;
btn->img_pressed = res_minimize_btn_pressed;
 
btn = create_button(NULL, ID_FULL,0,5,18,18,(ctrl_t*)cpt);
btn = create_button(NULL, ID_FULLSCREEN,0,5,18,18,(ctrl_t*)cpt);
cpt->full_btn = btn;
 
btn->img_default = res_full_btn;
243,6 → 243,20
win->win_state = MINIMIZED;
send_message((ctrl_t*)win, MSG_SIZE, 0, 0);
break;
case ID_FULLSCREEN:
{
int screensize;
screensize = GetScreenSize();
__asm__ __volatile__(
"int $0x40"
::"a"(67), "b"(0), "c"(0),
"d"((screensize >> 16)-1),"S"((screensize & 0xFFFF)-1) );
win->win_state = FULLSCREEN;
window_update_layout(win);
};
break;
default:
break;
};
/programs/media/Fplay/winlib/frame.c
139,6 → 139,9
rect_t *rc = NULL;
int x, y;
 
if(win->win_state == FULLSCREEN)
return 0;
x = ((pos_t)arg2).x;
y = ((pos_t)arg2).y;
 
/programs/media/Fplay/winlib/window.c
269,9 → 269,9
if( winw == win->w &&
winh == win->h &&
state == win->win_state)
return;
 
if(win->win_state != FULLSCREEN)
win->win_state = state;
#if 0