Fixed framerate problem with vsyc
This commit is contained in:
parent
d4c2ab0884
commit
df3bd366e2
4 changed files with 1530 additions and 1466 deletions
|
@ -10,9 +10,9 @@
|
|||
<Transport>None</Transport>
|
||||
</BuildHost>
|
||||
<DeploymentHost>
|
||||
<HostName>192.168.1.155</HostName>
|
||||
<HostName>172.16.2.42</HostName>
|
||||
<Transport>SSH</Transport>
|
||||
<UserName>root</UserName>
|
||||
<UserName>pi</UserName>
|
||||
</DeploymentHost>
|
||||
<MainSourceTransferCommand>
|
||||
<SkipWhenRunningCommandList>false</SkipWhenRunningCommandList>
|
||||
|
|
165
src/drawing.cpp
165
src/drawing.cpp
|
@ -175,7 +175,7 @@ int idletime_frames = 0;
|
|||
unsigned long idletime_time = 0;
|
||||
int idletime_percent = 0;
|
||||
#define IDLETIME_FRAMES 20
|
||||
unsigned long time_per_frame = 20000; // Default for PAL (50 Hz): 20000 microsecs
|
||||
long time_per_frame = 20000; // Default for PAL (50 Hz): 20000 microsecs
|
||||
|
||||
// Temporary define
|
||||
#define OFFSET_FREE_CPU_CYCLES 1500
|
||||
|
@ -506,7 +506,8 @@ STATIC_INLINE int DECODE_HAM8_1(int col, int pv)
|
|||
__asm__(
|
||||
"ubfx %[pv], %[pv], #3, #5 \n\t"
|
||||
"bfi %[col], %[pv], #0, #5 \n\t"
|
||||
: [col] "+r" (col) , [pv] "+r" (pv) );
|
||||
: [col] "+r" (col),
|
||||
[pv] "+r" (pv));
|
||||
return col;
|
||||
}
|
||||
STATIC_INLINE int DECODE_HAM8_2(int col, int pv)
|
||||
|
@ -514,7 +515,8 @@ STATIC_INLINE int DECODE_HAM8_2(int col, int pv)
|
|||
__asm__(
|
||||
"ubfx %[pv], %[pv], #3, #5 \n\t"
|
||||
"bfi %[col], %[pv], #11, #5 \n\t"
|
||||
: [col] "+r" (col) , [pv] "+r" (pv) );
|
||||
: [col] "+r" (col),
|
||||
[pv] "+r" (pv));
|
||||
return col;
|
||||
}
|
||||
STATIC_INLINE int DECODE_HAM8_3(int col, int pv)
|
||||
|
@ -522,7 +524,8 @@ STATIC_INLINE int DECODE_HAM8_3(int col, int pv)
|
|||
__asm__(
|
||||
"ubfx %[pv], %[pv], #2, #6 \n\t"
|
||||
"bfi %[col], %[pv], #5, #6 \n\t"
|
||||
: [col] "+r" (col) , [pv] "+r" (pv) );
|
||||
: [col] "+r" (col),
|
||||
[pv] "+r" (pv));
|
||||
return col;
|
||||
}
|
||||
|
||||
|
@ -531,7 +534,8 @@ STATIC_INLINE int DECODE_HAM6_1(int col, int pv)
|
|||
__asm__(
|
||||
"lsl %[pv], %[pv], #1 \n\t"
|
||||
"bfi %[col], %[pv], #0, #5 \n\t"
|
||||
: [col] "+r" (col) , [pv] "+r" (pv) );
|
||||
: [col] "+r" (col),
|
||||
[pv] "+r" (pv));
|
||||
return (col);
|
||||
}
|
||||
STATIC_INLINE int DECODE_HAM6_2(int col, int pv)
|
||||
|
@ -539,7 +543,8 @@ STATIC_INLINE int DECODE_HAM6_2(int col, int pv)
|
|||
__asm__(
|
||||
"lsl %[pv], %[pv], #1 \n\t"
|
||||
"bfi %[col], %[pv], #11, #5 \n\t"
|
||||
: [col] "+r" (col) , [pv] "+r" (pv) );
|
||||
: [col] "+r" (col),
|
||||
[pv] "+r" (pv));
|
||||
return (col);
|
||||
}
|
||||
STATIC_INLINE int DECODE_HAM6_3(int col, int pv)
|
||||
|
@ -547,7 +552,8 @@ STATIC_INLINE int DECODE_HAM6_3(int col, int pv)
|
|||
__asm__(
|
||||
"lsl %[pv], %[pv], #2 \n\t"
|
||||
"bfi %[col], %[pv], #5, #6 \n\t"
|
||||
: [col] "+r" (col) , [pv] "+r" (pv) );
|
||||
: [col] "+r" (col),
|
||||
[pv] "+r" (pv));
|
||||
return (col);
|
||||
}
|
||||
#endif
|
||||
|
@ -575,7 +581,8 @@ static void init_ham_decoding (void)
|
|||
else
|
||||
ham_lastcolor = colors_for_drawing.acolors[pv];
|
||||
}
|
||||
} else if (aga_mode) {
|
||||
}
|
||||
else if (aga_mode) {
|
||||
if (bplplanecnt >= 7) { /* AGA mode HAM8 */
|
||||
while (unpainted_amiga-- > 0) {
|
||||
int pv = pixdata.apixels[ham_decode_pixel++] ^ bplxor;
|
||||
|
@ -593,7 +600,8 @@ static void init_ham_decoding (void)
|
|||
#endif
|
||||
}
|
||||
}
|
||||
} else { /* AGA mode HAM6 */
|
||||
}
|
||||
else { /* AGA mode HAM6 */
|
||||
while (unpainted_amiga-- > 0) {
|
||||
int pv = pixdata.apixels[ham_decode_pixel++] ^ bplxor;
|
||||
switch (pv & 0x30)
|
||||
|
@ -611,7 +619,8 @@ static void init_ham_decoding (void)
|
|||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
/* OCS/ECS mode HAM6 */
|
||||
while (unpainted_amiga-- > 0) {
|
||||
int pv = pixdata.apixels[ham_decode_pixel++];
|
||||
|
@ -646,7 +655,8 @@ static void decode_ham (int pix, int stoppos)
|
|||
|
||||
ham_linebuf[ham_decode_pixel++] = ham_lastcolor;
|
||||
}
|
||||
} else if (aga_mode) {
|
||||
}
|
||||
else if (aga_mode) {
|
||||
if (bplplanecnt >= 7) { /* AGA mode HAM8 */
|
||||
while (todraw_amiga-- > 0) {
|
||||
int pv = pixdata.apixels[ham_decode_pixel] ^ bplxor;
|
||||
|
@ -665,7 +675,8 @@ static void decode_ham (int pix, int stoppos)
|
|||
}
|
||||
ham_linebuf[ham_decode_pixel++] = ham_lastcolor;
|
||||
}
|
||||
} else { /* AGA mode HAM6 */
|
||||
}
|
||||
else { /* AGA mode HAM6 */
|
||||
while (todraw_amiga-- > 0) {
|
||||
int pv = pixdata.apixels[ham_decode_pixel] ^ bplxor;
|
||||
switch (pv & 0x30)
|
||||
|
@ -684,7 +695,8 @@ static void decode_ham (int pix, int stoppos)
|
|||
ham_linebuf[ham_decode_pixel++] = ham_lastcolor;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
/* OCS/ECS mode HAM6 */
|
||||
while (todraw_amiga-- > 0) {
|
||||
int pv = pixdata.apixels[ham_decode_pixel];
|
||||
|
@ -862,7 +874,8 @@ static void draw_sprites_normal_sp_lo_at(struct sprite_entry *e)
|
|||
offs = sprite_bit[v];
|
||||
if (stbuf[pos] & offs) {
|
||||
col = sprite_col_at[v] + 16;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
col = sprite_col_nat[v] + 16;
|
||||
}
|
||||
pixdata.apixels[window_pos] = col;
|
||||
|
@ -894,7 +907,8 @@ static void draw_sprites_normal_ham_lo_at(struct sprite_entry *e)
|
|||
offs = sprite_bit[v];
|
||||
if (stbuf[pos] & offs) {
|
||||
col = sprite_col_at[v] + 16;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
col = sprite_col_nat[v] + 16;
|
||||
}
|
||||
ham_linebuf[window_pos] = colors_for_drawing.acolors[col];
|
||||
|
@ -929,7 +943,8 @@ static void draw_sprites_normal_dp_lo_at(struct sprite_entry *e)
|
|||
offs = sprite_bit[v];
|
||||
if (stbuf[pos] & offs) {
|
||||
col = sprite_col_at[v] + 16 + 128;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
col = sprite_col_nat[v] + 16 + 128;
|
||||
}
|
||||
pixdata.apixels[window_pos] = col;
|
||||
|
@ -1042,7 +1057,8 @@ static void draw_sprites_normal_sp_hi_at(struct sprite_entry *e)
|
|||
offs = sprite_bit[v];
|
||||
if (stbuf[pos] & offs) {
|
||||
col = sprite_col_at[v] + 16;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
col = sprite_col_nat[v] + 16;
|
||||
}
|
||||
pixdata.apixels_w[window_pos >> 1] = col | (col << 8);
|
||||
|
@ -1075,7 +1091,8 @@ static void draw_sprites_normal_ham_hi_at(struct sprite_entry *e)
|
|||
offs = sprite_bit[v];
|
||||
if (stbuf[pos] & offs) {
|
||||
col = sprite_col_at[v] + 16;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
col = sprite_col_nat[v] + 16;
|
||||
}
|
||||
col = col | (col << 8);
|
||||
|
@ -1113,7 +1130,8 @@ static void draw_sprites_normal_dp_hi_at(struct sprite_entry *e)
|
|||
offs = sprite_bit[v];
|
||||
if (stbuf[pos] & offs) {
|
||||
col = sprite_col_at[v] + 16 + 128;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
col = sprite_col_nat[v] + 16 + 128;
|
||||
}
|
||||
pixdata.apixels_w[window_pos >> 1] = col | (col << 8);
|
||||
|
@ -1124,17 +1142,29 @@ static void draw_sprites_normal_dp_hi_at(struct sprite_entry *e)
|
|||
|
||||
typedef void(*draw_sprites_func)(struct sprite_entry *e);
|
||||
static draw_sprites_func draw_sprites_dp_hi[2] = {
|
||||
draw_sprites_normal_dp_hi_nat, draw_sprites_normal_dp_hi_at };
|
||||
draw_sprites_normal_dp_hi_nat,
|
||||
draw_sprites_normal_dp_hi_at
|
||||
};
|
||||
static draw_sprites_func draw_sprites_sp_hi[2] = {
|
||||
draw_sprites_normal_sp_hi_nat, draw_sprites_normal_sp_hi_at };
|
||||
draw_sprites_normal_sp_hi_nat,
|
||||
draw_sprites_normal_sp_hi_at
|
||||
};
|
||||
static draw_sprites_func draw_sprites_ham_hi[2] = {
|
||||
draw_sprites_normal_ham_hi_nat, draw_sprites_normal_ham_hi_at };
|
||||
draw_sprites_normal_ham_hi_nat,
|
||||
draw_sprites_normal_ham_hi_at
|
||||
};
|
||||
static draw_sprites_func draw_sprites_dp_lo[2] = {
|
||||
draw_sprites_normal_dp_lo_nat, draw_sprites_normal_dp_lo_at };
|
||||
draw_sprites_normal_dp_lo_nat,
|
||||
draw_sprites_normal_dp_lo_at
|
||||
};
|
||||
static draw_sprites_func draw_sprites_sp_lo[2] = {
|
||||
draw_sprites_normal_sp_lo_nat, draw_sprites_normal_sp_lo_at };
|
||||
draw_sprites_normal_sp_lo_nat,
|
||||
draw_sprites_normal_sp_lo_at
|
||||
};
|
||||
static draw_sprites_func draw_sprites_ham_lo[2] = {
|
||||
draw_sprites_normal_ham_lo_nat, draw_sprites_normal_ham_lo_at };
|
||||
draw_sprites_normal_ham_lo_nat,
|
||||
draw_sprites_normal_ham_lo_at
|
||||
};
|
||||
|
||||
static draw_sprites_func *draw_sprites_punt = draw_sprites_sp_lo;
|
||||
|
||||
|
@ -1172,7 +1202,8 @@ STATIC_INLINE void draw_sprites_aga_ham (struct sprite_entry *e, const int doubl
|
|||
offs = sprite_bit[v];
|
||||
if (has_attach && (stbuf[pos] & offs)) {
|
||||
col = sprite_col_at[v] + sbasecol[1];
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
if (offs & 0x55)
|
||||
col = sprite_col_nat[v] + sbasecol[0];
|
||||
else
|
||||
|
@ -1226,7 +1257,8 @@ STATIC_INLINE void draw_sprites_aga_dp (struct sprite_entry *e, const int doubli
|
|||
offs = sprite_bit[v];
|
||||
if (has_attach && (stbuf[pos] & offs)) {
|
||||
col = sprite_col_at[v] + sbasecol[1];
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
if (offs & 0x55)
|
||||
col = sprite_col_nat[v] + sbasecol[0];
|
||||
else
|
||||
|
@ -1274,7 +1306,8 @@ STATIC_INLINE void draw_sprites_aga_sp (struct sprite_entry *e, const int doubli
|
|||
offs = sprite_bit[v];
|
||||
if (has_attach && (stbuf[pos] & offs)) {
|
||||
col = sprite_col_at[v] + sbasecol[1];
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
if (offs & 0x55)
|
||||
col = sprite_col_nat[v] + sbasecol[0];
|
||||
else
|
||||
|
@ -1318,25 +1351,43 @@ static void draw_sprites_aga_dp_shi_at(struct sprite_entry *e) { draw_sprites_
|
|||
static void draw_sprites_aga_ham_shi_at(struct sprite_entry *e) { draw_sprites_aga_ham(e, 1, 0, 1); }
|
||||
|
||||
static draw_sprites_func draw_sprites_aga_sp_lo[2] = {
|
||||
draw_sprites_aga_sp_lo_nat, draw_sprites_aga_sp_lo_at };
|
||||
draw_sprites_aga_sp_lo_nat,
|
||||
draw_sprites_aga_sp_lo_at
|
||||
};
|
||||
static draw_sprites_func draw_sprites_aga_sp_hi[2] = {
|
||||
draw_sprites_aga_sp_hi_nat, draw_sprites_aga_sp_hi_at };
|
||||
draw_sprites_aga_sp_hi_nat,
|
||||
draw_sprites_aga_sp_hi_at
|
||||
};
|
||||
static draw_sprites_func draw_sprites_aga_sp_shi[2] = {
|
||||
draw_sprites_aga_sp_shi_nat, draw_sprites_aga_sp_shi_at };
|
||||
draw_sprites_aga_sp_shi_nat,
|
||||
draw_sprites_aga_sp_shi_at
|
||||
};
|
||||
|
||||
static draw_sprites_func draw_sprites_aga_dp_lo[2] = {
|
||||
draw_sprites_aga_dp_lo_nat, draw_sprites_aga_dp_lo_at };
|
||||
draw_sprites_aga_dp_lo_nat,
|
||||
draw_sprites_aga_dp_lo_at
|
||||
};
|
||||
static draw_sprites_func draw_sprites_aga_dp_hi[2] = {
|
||||
draw_sprites_aga_dp_hi_nat, draw_sprites_aga_dp_hi_at };
|
||||
draw_sprites_aga_dp_hi_nat,
|
||||
draw_sprites_aga_dp_hi_at
|
||||
};
|
||||
static draw_sprites_func draw_sprites_aga_dp_shi[2] = {
|
||||
draw_sprites_aga_dp_shi_nat, draw_sprites_aga_dp_shi_at };
|
||||
draw_sprites_aga_dp_shi_nat,
|
||||
draw_sprites_aga_dp_shi_at
|
||||
};
|
||||
|
||||
static draw_sprites_func draw_sprites_aga_ham_lo[2] = {
|
||||
draw_sprites_aga_ham_lo_nat, draw_sprites_aga_ham_lo_at };
|
||||
draw_sprites_aga_ham_lo_nat,
|
||||
draw_sprites_aga_ham_lo_at
|
||||
};
|
||||
static draw_sprites_func draw_sprites_aga_ham_hi[2] = {
|
||||
draw_sprites_aga_ham_hi_nat, draw_sprites_aga_ham_hi_at };
|
||||
draw_sprites_aga_ham_hi_nat,
|
||||
draw_sprites_aga_ham_hi_at
|
||||
};
|
||||
static draw_sprites_func draw_sprites_aga_ham_shi[2] = {
|
||||
draw_sprites_aga_ham_shi_nat, draw_sprites_aga_ham_shi_at };
|
||||
draw_sprites_aga_ham_shi_nat,
|
||||
draw_sprites_aga_ham_shi_at
|
||||
};
|
||||
|
||||
static __inline__ void decide_draw_sprites(void)
|
||||
{
|
||||
|
@ -1557,8 +1608,14 @@ static void pfield_doline_n7 (uae_u32 *pixels, int wordcount, int lineno)
|
|||
typedef void(*pfield_doline_func)(uae_u32 *, int, int);
|
||||
|
||||
static pfield_doline_func pfield_doline_n[9] = {
|
||||
pfield_doline_n0, ARM_doline_n1, NEON_doline_n2, NEON_doline_n3,
|
||||
NEON_doline_n4, pfield_doline_n5, NEON_doline_n6, pfield_doline_n7,
|
||||
pfield_doline_n0,
|
||||
ARM_doline_n1,
|
||||
NEON_doline_n2,
|
||||
NEON_doline_n3,
|
||||
NEON_doline_n4,
|
||||
pfield_doline_n5,
|
||||
NEON_doline_n6,
|
||||
pfield_doline_n7,
|
||||
NEON_doline_n8
|
||||
};
|
||||
|
||||
|
@ -1728,7 +1785,8 @@ static void pfield_expand_dp_bplcon (void)
|
|||
sbasecol[0] = ((dp_for_drawing->bplcon4 >> 4) & 15) << 4;
|
||||
sbasecol[1] = ((dp_for_drawing->bplcon4 >> 0) & 15) << 4;
|
||||
bplxor = dp_for_drawing->bplcon4 >> 8;
|
||||
} else
|
||||
}
|
||||
else
|
||||
bplehb = (dp_for_drawing->bplcon0 & 0xFC00) == 0x6000 || (dp_for_drawing->bplcon0 & 0xFC00) == 0x7000;
|
||||
if ((currprefs.chipset_mask & CSMASK_ECS_DENISE) && (dp_for_drawing->bplcon2 & 0x0200))
|
||||
bplehb = 0;
|
||||
|
@ -1751,7 +1809,8 @@ static bool isham (uae_u16 bplcon0)
|
|||
// AGA only has 6 or 8 plane HAM
|
||||
if (p == 6 || p == 8)
|
||||
return 1;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
// OCS/ECS also supports 5 plane HAM
|
||||
if (GET_RES_DENISE(bplcon0) > 0)
|
||||
return 0;
|
||||
|
@ -1797,15 +1856,18 @@ static void adjust_drawing_colors (int ctable, int need_full)
|
|||
if (need_full) {
|
||||
color_reg_cpy(&colors_for_drawing, curr_color_tables + ctable);
|
||||
color_match_type = color_match_full;
|
||||
} else {
|
||||
memcpy (colors_for_drawing.acolors, curr_color_tables[ctable].acolors,
|
||||
}
|
||||
else {
|
||||
memcpy(colors_for_drawing.acolors,
|
||||
curr_color_tables[ctable].acolors,
|
||||
sizeof colors_for_drawing.acolors);
|
||||
colors_for_drawing.borderblank = curr_color_tables[ctable].borderblank;
|
||||
colors_for_drawing.bordersprite = curr_color_tables[ctable].bordersprite;
|
||||
color_match_type = color_match_acolors;
|
||||
}
|
||||
drawing_color_matches = ctable;
|
||||
} else if (need_full && color_match_type != color_match_full) {
|
||||
}
|
||||
else if (need_full && color_match_type != color_match_full) {
|
||||
color_reg_cpy(&colors_for_drawing, &curr_color_tables[ctable]);
|
||||
color_match_type = color_match_full;
|
||||
}
|
||||
|
@ -1853,11 +1915,13 @@ STATIC_INLINE void do_color_changes (line_draw_func worker_border, line_draw_fun
|
|||
unsigned int value = curr_color_changes[i].value;
|
||||
if (regno >= 0x1000) {
|
||||
pfield_expand_dp_bplconx(regno, value);
|
||||
} else if (regno >= 0) {
|
||||
}
|
||||
else if (regno >= 0) {
|
||||
if (regno == 0 && (value & COLOR_CHANGE_BRDBLANK)) {
|
||||
colors_for_drawing.borderblank = (value & 1) != 0;
|
||||
colors_for_drawing.bordersprite = (value & 3) == 2;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
color_reg_set(&colors_for_drawing, regno, value);
|
||||
colors_for_drawing.acolors[regno] = getxcolor(value);
|
||||
}
|
||||
|
@ -1894,7 +1958,8 @@ static void pfield_draw_line (int lineno, int gfx_ypos)
|
|||
/* The easy case: need to do HAM decoding only once for the
|
||||
* full line. */
|
||||
decode_ham(visible_left_border, visible_right_border);
|
||||
} else /* Argh. */ {
|
||||
}
|
||||
else /* Argh. */ {
|
||||
do_color_changes(dummy_worker, decode_ham);
|
||||
// reset colors to state before above do_color_changes()
|
||||
adjust_drawing_colors(dp_for_drawing->ctable, (dp_for_drawing->ham_seen || bplehb) ? -1 : 0);
|
||||
|
@ -1913,7 +1978,8 @@ static void pfield_draw_line (int lineno, int gfx_ypos)
|
|||
}
|
||||
|
||||
do_color_changes(pfield_do_fill_line, pfield_do_linetoscr);
|
||||
} else { // border > 0: top or bottom border
|
||||
}
|
||||
else { // border > 0: top or bottom border
|
||||
bool dosprites = false;
|
||||
|
||||
adjust_drawing_colors(dp_for_drawing->ctable, 0);
|
||||
|
@ -1947,7 +2013,8 @@ static void pfield_draw_line (int lineno, int gfx_ypos)
|
|||
bplxor = 0;
|
||||
do_color_changes(pfield_do_fill_line, pfield_do_linetoscr);
|
||||
bplxor = oxor;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
|
||||
playfield_start = visible_right_border;
|
||||
playfield_end = visible_right_border;
|
||||
|
|
|
@ -75,7 +75,8 @@ STATIC_INLINE uae_u16 CONVERT_RGB(uae_u32 c)
|
|||
"ubfx %[v], %[c], #3, #5 \n\t"
|
||||
"orr %[v], %[v], r1, lsl #11 \n\t"
|
||||
"orr %[v], %[v], r2, lsl #5 \n\t"
|
||||
: [v] "=r" (ret) : [c] "r" (c) : "r1", "r2" );
|
||||
: [v] "=r" (ret) : [c] "r" (c) : "r1",
|
||||
"r2");
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
@ -207,7 +208,7 @@ extern void init_hardware_for_drawing_frame (void);
|
|||
extern void reset_drawing(void);
|
||||
extern void drawing_init(void);
|
||||
|
||||
extern unsigned long time_per_frame;
|
||||
extern long time_per_frame;
|
||||
extern void adjust_idletime(long ns_waited);
|
||||
|
||||
/* Finally, stuff that shouldn't really be shared. */
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include "uae.h"
|
||||
#include "options.h"
|
||||
#include "gui.h"
|
||||
#include "include/memory.h"
|
||||
#include "memory.h"
|
||||
#include "newcpu.h"
|
||||
#include "inputdevice.h"
|
||||
#include "custom.h"
|
||||
|
@ -65,10 +65,12 @@ static int save_thumb(char *path);
|
|||
int delay_savestate_frame = 0;
|
||||
|
||||
int DispManXElementpresent = 0;
|
||||
|
||||
static long next_synctime = 0;
|
||||
|
||||
uae_sem_t vsync_wait_sem;
|
||||
|
||||
|
||||
DISPMANX_DISPLAY_HANDLE_T dispmanxdisplay;
|
||||
DISPMANX_MODEINFO_T dispmanxdinfo;
|
||||
DISPMANX_RESOURCE_HANDLE_T dispmanxresource_amigafb_1;
|
||||
|
@ -80,26 +82,28 @@ VC_RECT_T dst_rect;
|
|||
VC_RECT_T blit_rect;
|
||||
|
||||
unsigned char current_resource_amigafb = 0;
|
||||
|
||||
unsigned char need_wait_dispmanx_semaphore = 0;
|
||||
long start;
|
||||
|
||||
|
||||
void vsync_callback(unsigned int a, void* b)
|
||||
{
|
||||
uae_sem_post(&vsync_wait_sem);
|
||||
// Here we are synchronized with VSync
|
||||
// next_synctime is what we were expected as sync time.
|
||||
last_synctime = read_processor_time();
|
||||
// check if we miss a frame (with a margin of 1000 cycles)
|
||||
// Check if we miss a frame (with a margin of 1000 cycles)
|
||||
if (last_synctime - next_synctime > time_per_frame * (1 + currprefs.gfx_framerate) - (long)1000)
|
||||
adjust_idletime(-1);
|
||||
else
|
||||
adjust_idletime(last_synctime - start);
|
||||
// Update next synctime with current sync
|
||||
// Update next synctime with current sync.
|
||||
next_synctime = last_synctime + time_per_frame * (1 + currprefs.gfx_framerate);
|
||||
|
||||
uae_sem_post(&vsync_wait_sem);
|
||||
}
|
||||
|
||||
|
||||
int graphics_setup(void)
|
||||
{
|
||||
#ifdef PICASSO96
|
||||
|
@ -110,6 +114,7 @@ int graphics_setup(void)
|
|||
return 1;
|
||||
}
|
||||
|
||||
|
||||
void InitAmigaVidMode(struct uae_prefs *p)
|
||||
{
|
||||
/* Initialize structure for Amiga video modes */
|
||||
|
@ -139,6 +144,7 @@ void graphics_dispmanshutdown(void)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
void graphics_subshutdown(void)
|
||||
{
|
||||
if (dispmanxresource_amigafb_1 != 0)
|
||||
|
@ -148,14 +154,20 @@ void graphics_subshutdown(void)
|
|||
//prSDLScreen = NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
static void open_screen(struct uae_prefs *p)
|
||||
{
|
||||
|
||||
VC_DISPMANX_ALPHA_T alpha = {
|
||||
(DISPMANX_FLAGS_ALPHA_T)(DISPMANX_FLAGS_ALPHA_FROM_SOURCE | DISPMANX_FLAGS_ALPHA_FIXED_ALL_PIXELS),
|
||||
255, /*alpha 0->255*/
|
||||
0
|
||||
};
|
||||
|
||||
|
||||
uint32_t vc_image_ptr;
|
||||
int width;
|
||||
int height;
|
||||
|
@ -174,6 +186,7 @@ static void open_screen(struct uae_prefs *p)
|
|||
height = p->gfx_size.height;
|
||||
}
|
||||
|
||||
|
||||
//if(prSDLScreen != NULL)
|
||||
//{
|
||||
// SDL_FreeSurface(prSDLScreen);
|
||||
|
@ -183,9 +196,7 @@ static void open_screen(struct uae_prefs *p)
|
|||
if (Dummy_prSDLScreen == NULL)
|
||||
{
|
||||
const SDL_VideoInfo* videoInfo = SDL_GetVideoInfo();
|
||||
#ifdef DEBUG
|
||||
printf("DispmanX: Current resolution: %d x %d %d bpp\n", videoInfo->current_w, videoInfo->current_h, videoInfo->vfmt->BitsPerPixel);
|
||||
#endif
|
||||
// For debug, in order to avoid full screen.
|
||||
Dummy_prSDLScreen = SDL_SetVideoMode(videoInfo->current_w, videoInfo->current_h, 16, SDL_SWSURFACE | SDL_FULLSCREEN);
|
||||
//Dummy_prSDLScreen = SDL_SetVideoMode(800,480,16,SDL_SWSURFACE );
|
||||
|
@ -198,9 +209,7 @@ static void open_screen(struct uae_prefs *p)
|
|||
((blit_rect.width != width) || (blit_rect.height != height) || (currprefs.gfx_correct_aspect != changed_prefs.gfx_correct_aspect) ||
|
||||
(currprefs.gfx_fullscreen_ratio != changed_prefs.gfx_fullscreen_ratio)))
|
||||
{
|
||||
#ifdef DEBUG
|
||||
printf("Emulation resolution change detected.\n");
|
||||
#endif
|
||||
if (prSDLScreen != NULL)
|
||||
{
|
||||
SDL_FreeSurface(prSDLScreen);
|
||||
|
@ -215,9 +224,7 @@ static void open_screen(struct uae_prefs *p)
|
|||
|
||||
if (dispmanxresource_amigafb_1 == 0)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
printf("Emulation resolution: Width %i Height: %i\n", width, height);
|
||||
#endif
|
||||
currprefs.gfx_correct_aspect = changed_prefs.gfx_correct_aspect;
|
||||
currprefs.gfx_fullscreen_ratio = changed_prefs.gfx_fullscreen_ratio;
|
||||
prSDLScreen = SDL_CreateRGBSurface(SDL_SWSURFACE,
|
||||
|
@ -301,6 +308,7 @@ static void open_screen(struct uae_prefs *p)
|
|||
//framecnt = 1; // Don't draw frame before reset done
|
||||
}
|
||||
|
||||
|
||||
void update_display(struct uae_prefs *p)
|
||||
{
|
||||
open_screen(p);
|
||||
|
@ -310,6 +318,7 @@ void update_display(struct uae_prefs *p)
|
|||
framecnt = 1; // Don't draw frame before reset done
|
||||
}
|
||||
|
||||
|
||||
int check_prefs_changed_gfx(void)
|
||||
{
|
||||
int changed = 0;
|
||||
|
@ -364,8 +373,10 @@ void wait_for_vsync(void)
|
|||
// Temporary
|
||||
}
|
||||
|
||||
|
||||
void flush_screen()
|
||||
{
|
||||
//SDL_UnlockSurface (prSDLScreen);
|
||||
|
||||
if (savestate_state == STATE_DOSAVE)
|
||||
{
|
||||
|
@ -379,6 +390,11 @@ void flush_screen()
|
|||
}
|
||||
}
|
||||
|
||||
//start = read_processor_time();
|
||||
//if(start < next_synctime && next_synctime - start > time_per_frame - 1000)
|
||||
// usleep((next_synctime - start) - 1000);
|
||||
//SDL_Flip(prSDLScreen);
|
||||
|
||||
if (need_wait_dispmanx_semaphore == 1)
|
||||
{
|
||||
need_wait_dispmanx_semaphore = 0;
|
||||
|
@ -386,6 +402,7 @@ void flush_screen()
|
|||
uae_sem_wait(&vsync_wait_sem);
|
||||
}
|
||||
|
||||
|
||||
if (current_resource_amigafb == 1)
|
||||
{
|
||||
current_resource_amigafb = 0;
|
||||
|
@ -414,13 +431,13 @@ void flush_screen()
|
|||
|
||||
vc_dispmanx_update_submit(dispmanxupdate, vsync_callback, NULL);
|
||||
}
|
||||
|
||||
need_wait_dispmanx_semaphore = 1;
|
||||
|
||||
init_row_map();
|
||||
|
||||
}
|
||||
|
||||
|
||||
void black_screen_now(void)
|
||||
{
|
||||
SDL_FillRect(prSDLScreen, NULL, 0);
|
||||
|
@ -428,6 +445,7 @@ void black_screen_now(void)
|
|||
flush_screen();
|
||||
}
|
||||
|
||||
|
||||
static void graphics_subinit(void)
|
||||
{
|
||||
if (prSDLScreen == NULL)
|
||||
|
@ -455,6 +473,7 @@ STATIC_INLINE int bitsInMask(unsigned long mask)
|
|||
return n;
|
||||
}
|
||||
|
||||
|
||||
STATIC_INLINE int maskShift(unsigned long mask)
|
||||
{
|
||||
/* determine how far mask is shifted */
|
||||
|
@ -467,6 +486,7 @@ STATIC_INLINE int maskShift(unsigned long mask)
|
|||
return n;
|
||||
}
|
||||
|
||||
|
||||
static int init_colors(void)
|
||||
{
|
||||
int i;
|
||||
|
@ -488,6 +508,7 @@ static int init_colors(void)
|
|||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Find the colour depth of the display
|
||||
*/
|
||||
|
@ -496,8 +517,7 @@ static int get_display_depth(void)
|
|||
const SDL_VideoInfo *vid_info;
|
||||
int depth = 0;
|
||||
|
||||
if ((vid_info = SDL_GetVideoInfo()))
|
||||
{
|
||||
if ((vid_info = SDL_GetVideoInfo())) {
|
||||
depth = vid_info->vfmt->BitsPerPixel;
|
||||
|
||||
/* Don't trust the answer if it's 16 bits; the display
|
||||
|
@ -522,6 +542,7 @@ int GetSurfacePixelFormat(void)
|
|||
: RGBFB_NONE);
|
||||
}
|
||||
|
||||
|
||||
int graphics_init(bool mousecapture)
|
||||
{
|
||||
int i, j;
|
||||
|
@ -530,6 +551,7 @@ int graphics_init(bool mousecapture)
|
|||
|
||||
graphics_subinit();
|
||||
|
||||
|
||||
if (!init_colors())
|
||||
return 0;
|
||||
|
||||
|
@ -547,6 +569,7 @@ void graphics_leave(void)
|
|||
SDL_VideoQuit();
|
||||
}
|
||||
|
||||
|
||||
#define systemRedShift (prSDLScreen->format->Rshift)
|
||||
#define systemGreenShift (prSDLScreen->format->Gshift)
|
||||
#define systemBlueShift (prSDLScreen->format->Bshift)
|
||||
|
@ -566,16 +589,14 @@ static int save_png(SDL_Surface* surface, char *path)
|
|||
NULL,
|
||||
NULL,
|
||||
NULL);
|
||||
if (!png_ptr)
|
||||
{
|
||||
if (!png_ptr) {
|
||||
fclose(f);
|
||||
return 0;
|
||||
}
|
||||
|
||||
png_infop info_ptr = png_create_info_struct(png_ptr);
|
||||
|
||||
if (!info_ptr)
|
||||
{
|
||||
if (!info_ptr) {
|
||||
png_destroy_write_struct(&png_ptr, NULL);
|
||||
fclose(f);
|
||||
return 0;
|
||||
|
@ -626,6 +647,7 @@ static int save_png(SDL_Surface* surface, char *path)
|
|||
return 1;
|
||||
}
|
||||
|
||||
|
||||
static void CreateScreenshot(void)
|
||||
{
|
||||
int w, h;
|
||||
|
@ -649,6 +671,7 @@ static void CreateScreenshot(void)
|
|||
prSDLScreen->format->Amask);
|
||||
}
|
||||
|
||||
|
||||
static int save_thumb(char *path)
|
||||
{
|
||||
int ret = 0;
|
||||
|
@ -661,6 +684,134 @@ static int save_thumb(char *path)
|
|||
return ret;
|
||||
}
|
||||
|
||||
|
||||
#ifdef PICASSO96
|
||||
|
||||
|
||||
int picasso_palette(void)
|
||||
{
|
||||
int i, changed;
|
||||
|
||||
changed = 0;
|
||||
for (i = 0; i < 256; i++) {
|
||||
int r = picasso96_state.CLUT[i].Red;
|
||||
int g = picasso96_state.CLUT[i].Green;
|
||||
int b = picasso96_state.CLUT[i].Blue;
|
||||
int value = (r << 16 | g << 8 | b);
|
||||
uae_u32 v = CONVERT_RGB(value);
|
||||
if (v != picasso_vidinfo.clut[i]) {
|
||||
picasso_vidinfo.clut[i] = v;
|
||||
changed = 1;
|
||||
}
|
||||
}
|
||||
return changed;
|
||||
}
|
||||
|
||||
static int resolution_compare(const void *a, const void *b)
|
||||
{
|
||||
struct PicassoResolution *ma = (struct PicassoResolution *)a;
|
||||
struct PicassoResolution *mb = (struct PicassoResolution *)b;
|
||||
if (ma->res.width < mb->res.width)
|
||||
return -1;
|
||||
if (ma->res.width > mb->res.width)
|
||||
return 1;
|
||||
if (ma->res.height < mb->res.height)
|
||||
return -1;
|
||||
if (ma->res.height > mb->res.height)
|
||||
return 1;
|
||||
return ma->depth - mb->depth;
|
||||
}
|
||||
static void sortmodes(void)
|
||||
{
|
||||
int i = 0, idx = -1;
|
||||
int pw = -1, ph = -1;
|
||||
while (DisplayModes[i].depth >= 0)
|
||||
i++;
|
||||
qsort(DisplayModes, i, sizeof(struct PicassoResolution), resolution_compare);
|
||||
for (i = 0; DisplayModes[i].depth >= 0; i++) {
|
||||
if (DisplayModes[i].res.height != ph || DisplayModes[i].res.width != pw) {
|
||||
ph = DisplayModes[i].res.height;
|
||||
pw = DisplayModes[i].res.width;
|
||||
idx++;
|
||||
}
|
||||
DisplayModes[i].residx = idx;
|
||||
}
|
||||
}
|
||||
|
||||
static void modesList(void)
|
||||
{
|
||||
int i, j;
|
||||
|
||||
i = 0;
|
||||
while (DisplayModes[i].depth >= 0) {
|
||||
write_log("%d: %s (", i, DisplayModes[i].name);
|
||||
j = 0;
|
||||
while (DisplayModes[i].refresh[j] > 0) {
|
||||
if (j > 0)
|
||||
write_log(",");
|
||||
write_log("%d", DisplayModes[i].refresh[j]);
|
||||
j++;
|
||||
}
|
||||
write_log(")\n");
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
void picasso_InitResolutions(void)
|
||||
{
|
||||
struct MultiDisplay *md1;
|
||||
int i, count = 0;
|
||||
char tmp[200];
|
||||
int bit_idx;
|
||||
int bits[] = { 8, 16, 32 };
|
||||
|
||||
Displays[0].primary = 1;
|
||||
Displays[0].disabled = 0;
|
||||
Displays[0].rect.left = 0;
|
||||
Displays[0].rect.top = 0;
|
||||
Displays[0].rect.right = 800;
|
||||
Displays[0].rect.bottom = 640;
|
||||
sprintf(tmp, "%s (%d*%d)", "Display", Displays[0].rect.right, Displays[0].rect.bottom);
|
||||
Displays[0].name = my_strdup(tmp);
|
||||
Displays[0].name2 = my_strdup("Display");
|
||||
|
||||
md1 = Displays;
|
||||
DisplayModes = md1->DisplayModes = xmalloc(struct PicassoResolution, MAX_PICASSO_MODES);
|
||||
for (i = 0; i < MAX_SCREEN_MODES && count < MAX_PICASSO_MODES; i++) {
|
||||
for (bit_idx = 0; bit_idx < 3; ++bit_idx) {
|
||||
int bitdepth = bits[bit_idx];
|
||||
int bit_unit = (bitdepth + 1) & 0xF8;
|
||||
int rgbFormat = (bitdepth == 8 ? RGBFB_CLUT : (bitdepth == 16 ? RGBFB_R5G6B5 : RGBFB_R8G8B8A8));
|
||||
int pixelFormat = 1 << rgbFormat;
|
||||
pixelFormat |= RGBFF_CHUNKY;
|
||||
|
||||
//if (SDL_VideoModeOK (x_size_table[i], y_size_table[i], 16, SDL_SWSURFACE))
|
||||
{
|
||||
DisplayModes[count].res.width = x_size_table[i];
|
||||
DisplayModes[count].res.height = y_size_table[i];
|
||||
DisplayModes[count].depth = bit_unit >> 3;
|
||||
DisplayModes[count].refresh[0] = 50;
|
||||
DisplayModes[count].refresh[1] = 60;
|
||||
DisplayModes[count].refresh[2] = 0;
|
||||
DisplayModes[count].colormodes = pixelFormat;
|
||||
sprintf(DisplayModes[count].name,
|
||||
"%dx%d, %d-bit",
|
||||
DisplayModes[count].res.width,
|
||||
DisplayModes[count].res.height,
|
||||
DisplayModes[count].depth * 8);
|
||||
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
DisplayModes[count].depth = -1;
|
||||
sortmodes();
|
||||
modesList();
|
||||
DisplayModes = Displays[0].DisplayModes;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
bool vsync_switchmode(int hz)
|
||||
{
|
||||
int changed_height = changed_prefs.gfx_size.height;
|
||||
|
@ -673,51 +824,25 @@ bool vsync_switchmode(int hz)
|
|||
if (hz == 50 && currVSyncRate == 60)
|
||||
{
|
||||
// Switch from NTSC -> PAL
|
||||
switch (changed_height)
|
||||
{
|
||||
case 200:
|
||||
changed_height = 240;
|
||||
break;
|
||||
case 216:
|
||||
changed_height = 262;
|
||||
break;
|
||||
case 240:
|
||||
changed_height = 270;
|
||||
break;
|
||||
case 256:
|
||||
changed_height = 270;
|
||||
break;
|
||||
case 262:
|
||||
changed_height = 270;
|
||||
break;
|
||||
case 270:
|
||||
changed_height = 270;
|
||||
break;
|
||||
switch (changed_height) {
|
||||
case 200: changed_height = 240; break;
|
||||
case 216: changed_height = 262; break;
|
||||
case 240: changed_height = 270; break;
|
||||
case 256: changed_height = 270; break;
|
||||
case 262: changed_height = 270; break;
|
||||
case 270: changed_height = 270; break;
|
||||
}
|
||||
}
|
||||
else if (hz == 60 && currVSyncRate == 50)
|
||||
{
|
||||
// Switch from PAL -> NTSC
|
||||
switch (changed_height)
|
||||
{
|
||||
case 200:
|
||||
changed_height = 200;
|
||||
break;
|
||||
case 216:
|
||||
changed_height = 200;
|
||||
break;
|
||||
case 240:
|
||||
changed_height = 200;
|
||||
break;
|
||||
case 256:
|
||||
changed_height = 216;
|
||||
break;
|
||||
case 262:
|
||||
changed_height = 216;
|
||||
break;
|
||||
case 270:
|
||||
changed_height = 240;
|
||||
break;
|
||||
switch (changed_height) {
|
||||
case 200: changed_height = 200; break;
|
||||
case 216: changed_height = 200; break;
|
||||
case 240: changed_height = 200; break;
|
||||
case 256: changed_height = 216; break;
|
||||
case 262: changed_height = 216; break;
|
||||
case 270: changed_height = 240; break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -752,135 +877,6 @@ bool target_graphics_buffer_update(void)
|
|||
|
||||
#ifdef PICASSO96
|
||||
|
||||
int picasso_palette(void)
|
||||
{
|
||||
int i, changed;
|
||||
|
||||
changed = 0;
|
||||
for (i = 0; i < 256; i++)
|
||||
{
|
||||
int r = picasso96_state.CLUT[i].Red;
|
||||
int g = picasso96_state.CLUT[i].Green;
|
||||
int b = picasso96_state.CLUT[i].Blue;
|
||||
int value = (r << 16 | g << 8 | b);
|
||||
uae_u32 v = CONVERT_RGB(value);
|
||||
if (v != picasso_vidinfo.clut[i])
|
||||
{
|
||||
picasso_vidinfo.clut[i] = v;
|
||||
changed = 1;
|
||||
}
|
||||
}
|
||||
return changed;
|
||||
}
|
||||
|
||||
static int resolution_compare(const void *a, const void *b)
|
||||
{
|
||||
struct PicassoResolution *ma = (struct PicassoResolution *)a;
|
||||
struct PicassoResolution *mb = (struct PicassoResolution *)b;
|
||||
if (ma->res.width < mb->res.width)
|
||||
return -1;
|
||||
if (ma->res.width > mb->res.width)
|
||||
return 1;
|
||||
if (ma->res.height < mb->res.height)
|
||||
return -1;
|
||||
if (ma->res.height > mb->res.height)
|
||||
return 1;
|
||||
return ma->depth - mb->depth;
|
||||
}
|
||||
static void sortmodes(void)
|
||||
{
|
||||
int i = 0, idx = -1;
|
||||
int pw = -1, ph = -1;
|
||||
while (DisplayModes[i].depth >= 0)
|
||||
i++;
|
||||
qsort(DisplayModes, i, sizeof(struct PicassoResolution), resolution_compare);
|
||||
for (i = 0; DisplayModes[i].depth >= 0; i++)
|
||||
{
|
||||
if (DisplayModes[i].res.height != ph || DisplayModes[i].res.width != pw)
|
||||
{
|
||||
ph = DisplayModes[i].res.height;
|
||||
pw = DisplayModes[i].res.width;
|
||||
idx++;
|
||||
}
|
||||
DisplayModes[i].residx = idx;
|
||||
}
|
||||
}
|
||||
|
||||
static void modesList(void)
|
||||
{
|
||||
int i, j;
|
||||
|
||||
i = 0;
|
||||
while (DisplayModes[i].depth >= 0)
|
||||
{
|
||||
write_log("%d: %s (", i, DisplayModes[i].name);
|
||||
j = 0;
|
||||
while (DisplayModes[i].refresh[j] > 0)
|
||||
{
|
||||
if (j > 0)
|
||||
write_log(",");
|
||||
write_log("%d", DisplayModes[i].refresh[j]);
|
||||
j++;
|
||||
}
|
||||
write_log(")\n");
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
void picasso_InitResolutions(void)
|
||||
{
|
||||
struct MultiDisplay *md1;
|
||||
int i, count = 0;
|
||||
char tmp[200];
|
||||
int bit_idx;
|
||||
int bits[] = { 8, 16, 32 };
|
||||
|
||||
Displays[0].primary = 1;
|
||||
Displays[0].disabled = 0;
|
||||
Displays[0].rect.left = 0;
|
||||
Displays[0].rect.top = 0;
|
||||
Displays[0].rect.right = 800;
|
||||
Displays[0].rect.bottom = 640;
|
||||
sprintf(tmp, "%s (%d*%d)", "Display", Displays[0].rect.right, Displays[0].rect.bottom);
|
||||
Displays[0].name = my_strdup(tmp);
|
||||
Displays[0].name2 = my_strdup("Display");
|
||||
|
||||
md1 = Displays;
|
||||
DisplayModes = md1->DisplayModes = xmalloc(struct PicassoResolution, MAX_PICASSO_MODES);
|
||||
for (i = 0; i < MAX_SCREEN_MODES && count < MAX_PICASSO_MODES; i++)
|
||||
{
|
||||
for (bit_idx = 0; bit_idx < 3; ++bit_idx)
|
||||
{
|
||||
int bitdepth = bits[bit_idx];
|
||||
int bit_unit = (bitdepth + 1) & 0xF8;
|
||||
int rgbFormat = (bitdepth == 8 ? RGBFB_CLUT : (bitdepth == 16 ? RGBFB_R5G6B5 : RGBFB_R8G8B8A8));
|
||||
int pixelFormat = 1 << rgbFormat;
|
||||
pixelFormat |= RGBFF_CHUNKY;
|
||||
|
||||
//if (SDL_VideoModeOK (x_size_table[i], y_size_table[i], 16, SDL_SWSURFACE))
|
||||
{
|
||||
DisplayModes[count].res.width = x_size_table[i];
|
||||
DisplayModes[count].res.height = y_size_table[i];
|
||||
DisplayModes[count].depth = bit_unit >> 3;
|
||||
DisplayModes[count].refresh[0] = 50;
|
||||
DisplayModes[count].refresh[1] = 60;
|
||||
DisplayModes[count].refresh[2] = 0;
|
||||
DisplayModes[count].colormodes = pixelFormat;
|
||||
sprintf(DisplayModes[count].name,
|
||||
"%dx%d, %d-bit",
|
||||
DisplayModes[count].res.width,
|
||||
DisplayModes[count].res.height,
|
||||
DisplayModes[count].depth * 8);
|
||||
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
DisplayModes[count].depth = -1;
|
||||
sortmodes();
|
||||
modesList();
|
||||
DisplayModes = Displays[0].DisplayModes;
|
||||
}
|
||||
|
||||
void gfx_set_picasso_state(int on)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue