mirror of
https://github.com/86Box/86Box.git
synced 2026-02-22 09:35:32 -07:00
Merge pull request #1687 from 86Box/master
Bring the branch up to part with master.
This commit is contained in:
@@ -235,7 +235,6 @@ static d86f_t *d86f[FDD_NUM];
|
||||
static uint16_t CRCTable[256];
|
||||
static fdc_t *d86f_fdc;
|
||||
uint64_t poly = 0x42F0E1EBA9EA3693ll; /* ECMA normal */
|
||||
uint64_t table[256];
|
||||
|
||||
|
||||
uint16_t d86f_side_flags(int drive);
|
||||
|
||||
@@ -205,7 +205,7 @@ void svga_close(svga_t *svga);
|
||||
uint32_t svga_mask_addr(uint32_t addr, svga_t *svga);
|
||||
uint32_t svga_mask_changedaddr(uint32_t addr, svga_t *svga);
|
||||
|
||||
void svga_doblit(int y1, int y2, int wx, int wy, svga_t *svga);
|
||||
void svga_doblit(int wx, int wy, svga_t *svga);
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
@@ -84,7 +84,7 @@ typedef rgb_t PALETTE[256];
|
||||
extern int changeframecount;
|
||||
|
||||
extern volatile int screenshots;
|
||||
extern bitmap_t *buffer32, *render_buffer;
|
||||
extern bitmap_t *buffer32;
|
||||
extern PALETTE cgapal,
|
||||
cgapal_mono[6];
|
||||
extern uint32_t pal_lookup[256];
|
||||
@@ -150,10 +150,10 @@ extern void video_inform(int type, const video_timings_t *ptr);
|
||||
extern int video_get_type(void);
|
||||
|
||||
|
||||
extern void video_setblit(void(*blit)(int,int,int,int,int,int));
|
||||
extern void video_setblit(void(*blit)(int,int,int,int));
|
||||
extern void video_blend(int x, int y);
|
||||
extern void video_blit_memtoscreen_8(int x, int y, int y1, int y2, int w, int h);
|
||||
extern void video_blit_memtoscreen(int x, int y, int y1, int y2, int w, int h);
|
||||
extern void video_blit_memtoscreen_8(int x, int y, int w, int h);
|
||||
extern void video_blit_memtoscreen(int x, int y, int w, int h);
|
||||
extern void video_blit_complete(void);
|
||||
extern void video_wait_for_blit(void);
|
||||
extern void video_wait_for_buffer(void);
|
||||
@@ -353,6 +353,7 @@ extern const device_t s3_phoenix_trio64vplus_pci_device;
|
||||
extern const device_t s3_phoenix_trio64vplus_onboard_pci_device;
|
||||
extern const device_t s3_mirocrystal_20sv_964_vlb_device;
|
||||
extern const device_t s3_mirocrystal_20sv_964_pci_device;
|
||||
extern const device_t s3_mirocrystal_20sd_864_vlb_device;
|
||||
extern const device_t s3_phoenix_vision864_pci_device;
|
||||
extern const device_t s3_phoenix_vision864_vlb_device;
|
||||
extern const device_t s3_phoenix_vision868_pci_device;
|
||||
@@ -361,8 +362,9 @@ extern const device_t s3_diamond_stealth64_pci_device;
|
||||
extern const device_t s3_diamond_stealth64_vlb_device;
|
||||
extern const device_t s3_diamond_stealth64_964_pci_device;
|
||||
extern const device_t s3_diamond_stealth64_964_vlb_device;
|
||||
extern const device_t s3_mirovideo_40sv_968_pci_device;
|
||||
extern const device_t s3_mirovideo_40sv_968_vlb_device;
|
||||
extern const device_t s3_mirovideo_40sv_ergo_968_pci_device;
|
||||
extern const device_t s3_phoenix_vision968_pci_device;
|
||||
extern const device_t s3_phoenix_vision968_vlb_device;
|
||||
extern const device_t s3_spea_mercury_p64v_pci_device;
|
||||
extern const device_t s3_elsa_winner2000_pro_x_964_pci_device;
|
||||
extern const device_t s3_elsa_winner2000_pro_x_pci_device;
|
||||
|
||||
@@ -577,10 +577,10 @@ vid_poll_1512(void *priv)
|
||||
}
|
||||
|
||||
if (enable_overscan) {
|
||||
video_blit_memtoscreen_8(0, (vid->firstline - 4) << 1, 0, ((vid->lastline - vid->firstline) + 8) << 1,
|
||||
video_blit_memtoscreen_8(0, (vid->firstline - 4) << 1,
|
||||
xsize, ((vid->lastline - vid->firstline) + 8) << 1);
|
||||
} else {
|
||||
video_blit_memtoscreen_8(8, vid->firstline << 1, 0, (vid->lastline - vid->firstline) << 1,
|
||||
video_blit_memtoscreen_8(8, vid->firstline << 1,
|
||||
xsize, (vid->lastline - vid->firstline) << 1);
|
||||
}
|
||||
}
|
||||
@@ -1403,7 +1403,7 @@ lcdm_poll(amsvid_t *vid)
|
||||
if (video_force_resize_get())
|
||||
video_force_resize_set(0);
|
||||
}
|
||||
video_blit_memtoscreen(0, mda->firstline, 0, ysize, xsize, ysize);
|
||||
video_blit_memtoscreen(0, mda->firstline, xsize, ysize);
|
||||
frames++;
|
||||
video_res_x = mda->crtc[1];
|
||||
video_res_y = mda->crtc[6];
|
||||
@@ -1571,7 +1571,7 @@ lcdc_poll(amsvid_t *vid)
|
||||
video_force_resize_set(0);
|
||||
}
|
||||
|
||||
video_blit_memtoscreen(0, cga->firstline << 1, 0, (cga->lastline - cga->firstline) << 1,
|
||||
video_blit_memtoscreen(0, cga->firstline << 1,
|
||||
xsize, (cga->lastline - cga->firstline) << 1);
|
||||
}
|
||||
|
||||
|
||||
@@ -514,7 +514,7 @@ compaq_plasma_poll(void *p)
|
||||
if (video_force_resize_get())
|
||||
video_force_resize_set(0);
|
||||
}
|
||||
video_blit_memtoscreen(0, 0, 0, ysize, xsize, ysize);
|
||||
video_blit_memtoscreen(0, 0, xsize, ysize);
|
||||
frames++;
|
||||
|
||||
/* Fixed 640x400 resolution */
|
||||
|
||||
@@ -590,7 +590,7 @@ void t3100e_poll(void *p)
|
||||
if (video_force_resize_get())
|
||||
video_force_resize_set(0);
|
||||
}
|
||||
video_blit_memtoscreen(0, 0, 0, ysize, xsize, ysize);
|
||||
video_blit_memtoscreen(0, 0, xsize, ysize);
|
||||
|
||||
frames++;
|
||||
/* Fixed 640x400 resolution */
|
||||
|
||||
@@ -566,17 +566,17 @@ vid_poll(void *p)
|
||||
|
||||
if (enable_overscan) {
|
||||
if (pcjr->composite)
|
||||
video_blit_memtoscreen(0, (pcjr->firstline - 4) << 1, 0, ((pcjr->lastline - pcjr->firstline) + 8) << 1,
|
||||
video_blit_memtoscreen(0, (pcjr->firstline - 4) << 1,
|
||||
xsize, ((pcjr->lastline - pcjr->firstline) + 8) << 1);
|
||||
else
|
||||
video_blit_memtoscreen_8(0, (pcjr->firstline - 4) << 1, 0, ((pcjr->lastline - pcjr->firstline) + 8) << 1,
|
||||
video_blit_memtoscreen_8(0, (pcjr->firstline - 4) << 1,
|
||||
xsize, ((pcjr->lastline - pcjr->firstline) + 8) << 1);
|
||||
} else {
|
||||
if (pcjr->composite)
|
||||
video_blit_memtoscreen(8, pcjr->firstline << 1, 0, (pcjr->lastline - pcjr->firstline) << 1,
|
||||
video_blit_memtoscreen(8, pcjr->firstline << 1,
|
||||
xsize, (pcjr->lastline - pcjr->firstline) << 1);
|
||||
else
|
||||
video_blit_memtoscreen_8(8, pcjr->firstline << 1, 0, (pcjr->lastline - pcjr->firstline) << 1,
|
||||
video_blit_memtoscreen_8(8, pcjr->firstline << 1,
|
||||
xsize, (pcjr->lastline - pcjr->firstline) << 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1032,17 +1032,17 @@ vid_poll(void *priv)
|
||||
|
||||
if (enable_overscan) {
|
||||
if (!dev->is_sl2 && vid->composite)
|
||||
video_blit_memtoscreen(0, (vid->firstline - 4) << 1, 0, ((vid->lastline - vid->firstline) + 8) << 1,
|
||||
video_blit_memtoscreen(0, (vid->firstline - 4) << 1,
|
||||
xsize, ((vid->lastline - vid->firstline) + 8) << 1);
|
||||
else
|
||||
video_blit_memtoscreen_8(0, (vid->firstline - 4) << 1, 0, ((vid->lastline - vid->firstline) + 8) << 1,
|
||||
video_blit_memtoscreen_8(0, (vid->firstline - 4) << 1,
|
||||
xsize, ((vid->lastline - vid->firstline) + 8) << 1);
|
||||
} else {
|
||||
if (!dev->is_sl2 && vid->composite)
|
||||
video_blit_memtoscreen(8, vid->firstline << 1, 0, (vid->lastline - vid->firstline) << 1,
|
||||
video_blit_memtoscreen(8, vid->firstline << 1,
|
||||
xsize, (vid->lastline - vid->firstline) << 1);
|
||||
else
|
||||
video_blit_memtoscreen_8(8, vid->firstline << 1, 0, (vid->lastline - vid->firstline) << 1,
|
||||
video_blit_memtoscreen_8(8, vid->firstline << 1,
|
||||
xsize, (vid->lastline - vid->firstline) << 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -556,7 +556,7 @@ static void t1000_poll(void *p)
|
||||
if (video_force_resize_get())
|
||||
video_force_resize_set(0);
|
||||
}
|
||||
video_blit_memtoscreen(0, 0, 0, ysize, xsize, ysize);
|
||||
video_blit_memtoscreen(0, 0, xsize, ysize);
|
||||
|
||||
frames++;
|
||||
/* Fixed 640x200 resolution */
|
||||
|
||||
@@ -2,10 +2,7 @@
|
||||
#define _FILE_OFFSET_BITS 64
|
||||
#define _LARGEFILE64_SOURCE 1
|
||||
#endif
|
||||
#define _POSIX_C_SOURCE 200809L
|
||||
#ifdef __APPLE__
|
||||
#define _DARWIN_C_SOURCE 1
|
||||
#endif
|
||||
#include <SDL.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
@@ -20,7 +17,7 @@
|
||||
#include <inttypes.h>
|
||||
#include <dlfcn.h>
|
||||
#include <wchar.h>
|
||||
#include <SDL.h>
|
||||
|
||||
#include <86box/86box.h>
|
||||
#include <86box/keyboard.h>
|
||||
#include <86box/mouse.h>
|
||||
@@ -164,10 +161,10 @@ static const uint16_t sdl_to_xt[0x200] =
|
||||
|
||||
typedef struct sdl_blit_params
|
||||
{
|
||||
int x, y, y1, y2, w, h;
|
||||
int x, y, w, h;
|
||||
} sdl_blit_params;
|
||||
|
||||
sdl_blit_params params = { 0, 0, 0, 0, 0, 0 };
|
||||
sdl_blit_params params = { 0, 0, 0, 0 };
|
||||
int blitreq = 0;
|
||||
|
||||
void* dynld_module(const char *name, dllimp_t *table)
|
||||
@@ -610,7 +607,7 @@ void ui_sb_bugui(char *str)
|
||||
|
||||
}
|
||||
|
||||
extern void sdl_blit(int x, int y, int y1, int y2, int w, int h);
|
||||
extern void sdl_blit(int x, int y, int w, int h);
|
||||
|
||||
typedef struct mouseinputdata
|
||||
{
|
||||
@@ -1125,8 +1122,8 @@ int main(int argc, char** argv)
|
||||
}
|
||||
if (blitreq)
|
||||
{
|
||||
extern void sdl_blit(int x, int y, int y1, int y2, int w, int h);
|
||||
sdl_blit(params.x, params.y, params.y1, params.y2, params.w, params.h);
|
||||
extern void sdl_blit(int x, int y, int w, int h);
|
||||
sdl_blit(params.x, params.y, params.w, params.h);
|
||||
}
|
||||
if (title_set)
|
||||
{
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
typedef struct sdl_blit_params
|
||||
{
|
||||
int x, y, y1, y2, w, h;
|
||||
int x, y, w, h;
|
||||
} sdl_blit_params;
|
||||
extern sdl_blit_params params;
|
||||
extern int blitreq;
|
||||
@@ -121,26 +121,24 @@ sdl_stretch(int *w, int *h, int *x, int *y)
|
||||
|
||||
|
||||
void
|
||||
sdl_blit_shim(int x, int y, int y1, int y2, int w, int h)
|
||||
sdl_blit_shim(int x, int y, int w, int h)
|
||||
{
|
||||
params.x = x;
|
||||
params.y = y;
|
||||
params.w = w;
|
||||
params.h = h;
|
||||
params.y1 = y1;
|
||||
params.y2 = y2;
|
||||
blitreq = 1;
|
||||
}
|
||||
|
||||
void ui_window_title_real();
|
||||
|
||||
void
|
||||
sdl_blit(int x, int y, int y1, int y2, int w, int h)
|
||||
sdl_blit(int x, int y, int w, int h)
|
||||
{
|
||||
SDL_Rect r_src;
|
||||
int ret;
|
||||
|
||||
if (!sdl_enabled || (y1 == y2) || (h <= 0) || (render_buffer == NULL) || (sdl_render == NULL) || (sdl_tex == NULL)) {
|
||||
if (!sdl_enabled || (h <= 0) || (buffer32 == NULL) || (sdl_render == NULL) || (sdl_tex == NULL)) {
|
||||
video_blit_complete();
|
||||
return;
|
||||
}
|
||||
@@ -153,17 +151,17 @@ sdl_blit(int x, int y, int y1, int y2, int w, int h)
|
||||
else sdl_resize(resize_w, resize_h);
|
||||
resize_pending = 0;
|
||||
}
|
||||
r_src.x = 0;
|
||||
r_src.y = y1;
|
||||
r_src.x = x;
|
||||
r_src.y = y;
|
||||
r_src.w = w;
|
||||
r_src.h = y2 - y1;
|
||||
SDL_UpdateTexture(sdl_tex, &r_src, &(render_buffer->dat)[y1 * w], w * 4);
|
||||
r_src.h = h;
|
||||
SDL_UpdateTexture(sdl_tex, &r_src, &(buffer32->line[y][x]), (2048 + 64) * 4);
|
||||
video_blit_complete();
|
||||
|
||||
SDL_RenderClear(sdl_render);
|
||||
|
||||
r_src.x = 0;
|
||||
r_src.y = 0;
|
||||
r_src.x = x;
|
||||
r_src.y = y;
|
||||
r_src.w = w;
|
||||
r_src.h = h;
|
||||
|
||||
@@ -367,7 +365,7 @@ sdl_init_common(int flags)
|
||||
}
|
||||
|
||||
sdl_mutex = SDL_CreateMutex();
|
||||
sdl_win = SDL_CreateWindow("86Box", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, scrnsz_x, scrnsz_y, SDL_WINDOW_OPENGL);
|
||||
sdl_win = SDL_CreateWindow("86Box", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, scrnsz_x, scrnsz_y, SDL_WINDOW_OPENGL | (vid_resize & 1 ? SDL_WINDOW_RESIZABLE : 0));
|
||||
sdl_set_fs(video_fullscreen);
|
||||
if (!(video_fullscreen & 1))
|
||||
{
|
||||
|
||||
@@ -463,17 +463,17 @@ cga_poll(void *p)
|
||||
|
||||
if (enable_overscan) {
|
||||
if (cga->composite)
|
||||
video_blit_memtoscreen(0, (cga->firstline - 4) << 1, 0, ((cga->lastline - cga->firstline) + 8) << 1,
|
||||
video_blit_memtoscreen(0, (cga->firstline - 4) << 1,
|
||||
xsize, ((cga->lastline - cga->firstline) + 8) << 1);
|
||||
else
|
||||
video_blit_memtoscreen_8(0, (cga->firstline - 4) << 1, 0, ((cga->lastline - cga->firstline) + 8) << 1,
|
||||
video_blit_memtoscreen_8(0, (cga->firstline - 4) << 1,
|
||||
xsize, ((cga->lastline - cga->firstline) + 8) << 1);
|
||||
} else {
|
||||
if (cga->composite)
|
||||
video_blit_memtoscreen(8, cga->firstline << 1, 0, (cga->lastline - cga->firstline) << 1,
|
||||
video_blit_memtoscreen(8, cga->firstline << 1,
|
||||
xsize, (cga->lastline - cga->firstline) << 1);
|
||||
else
|
||||
video_blit_memtoscreen_8(8, cga->firstline << 1, 0, (cga->lastline - cga->firstline) << 1,
|
||||
video_blit_memtoscreen_8(8, cga->firstline << 1,
|
||||
xsize, (cga->lastline - cga->firstline) << 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -326,9 +326,9 @@ void colorplus_poll(void *p)
|
||||
}
|
||||
|
||||
if (colorplus->cga.composite)
|
||||
video_blit_memtoscreen(0, colorplus->cga.firstline - 4, 0, (colorplus->cga.lastline - colorplus->cga.firstline) + 8, xsize, (colorplus->cga.lastline - colorplus->cga.firstline) + 8);
|
||||
video_blit_memtoscreen(0, colorplus->cga.firstline - 4, xsize, (colorplus->cga.lastline - colorplus->cga.firstline) + 8);
|
||||
else
|
||||
video_blit_memtoscreen_8(0, colorplus->cga.firstline - 4, 0, (colorplus->cga.lastline - colorplus->cga.firstline) + 8, xsize, (colorplus->cga.lastline - colorplus->cga.firstline) + 8);
|
||||
video_blit_memtoscreen_8(0, colorplus->cga.firstline - 4, xsize, (colorplus->cga.lastline - colorplus->cga.firstline) + 8);
|
||||
frames++;
|
||||
|
||||
video_res_x = xsize - 16;
|
||||
|
||||
@@ -340,14 +340,14 @@ compaq_cga_poll(void *p)
|
||||
|
||||
if (enable_overscan) {
|
||||
if (self->cga.composite)
|
||||
video_blit_memtoscreen(0, self->cga.firstline - 8, 0, (self->cga.lastline - self->cga.firstline) + 16, xsize, (self->cga.lastline - self->cga.firstline) + 16);
|
||||
video_blit_memtoscreen(0, self->cga.firstline - 8, xsize, (self->cga.lastline - self->cga.firstline) + 16);
|
||||
else
|
||||
video_blit_memtoscreen_8(0, self->cga.firstline - 8, 0, (self->cga.lastline - self->cga.firstline) + 16, xsize, (self->cga.lastline - self->cga.firstline) + 16);
|
||||
video_blit_memtoscreen_8(0, self->cga.firstline - 8, xsize, (self->cga.lastline - self->cga.firstline) + 16);
|
||||
} else {
|
||||
if (self->cga.composite)
|
||||
video_blit_memtoscreen(8, self->cga.firstline, 0, self->cga.lastline - self->cga.firstline, xsize, self->cga.lastline - self->cga.firstline);
|
||||
video_blit_memtoscreen(8, self->cga.firstline, xsize, self->cga.lastline - self->cga.firstline);
|
||||
else
|
||||
video_blit_memtoscreen_8(8, self->cga.firstline, 0, self->cga.lastline - self->cga.firstline, xsize, self->cga.lastline - self->cga.firstline);
|
||||
video_blit_memtoscreen_8(8, self->cga.firstline, xsize, self->cga.lastline - self->cga.firstline);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
#include <86box/vid_ega.h>
|
||||
|
||||
|
||||
void ega_doblit(int y1, int y2, int wx, int wy, ega_t *ega);
|
||||
void ega_doblit(int wx, int wy, ega_t *ega);
|
||||
|
||||
|
||||
#define BIOS_IBM_PATH "roms/video/ega/ibm_6277356_ega_card_u44_27128.bin"
|
||||
@@ -597,10 +597,10 @@ ega_poll(void *p)
|
||||
|
||||
if (ega->vres) {
|
||||
wy = (ega->lastline - ega->firstline) << 1;
|
||||
ega_doblit(ega->firstline_draw << 1, (ega->lastline_draw + 1) << 1, wx, wy, ega);
|
||||
ega_doblit(wx, wy, ega);
|
||||
} else {
|
||||
wy = ega->lastline - ega->firstline;
|
||||
ega_doblit(ega->firstline_draw, ega->lastline_draw + 1, wx, wy, ega);
|
||||
ega_doblit(wx, wy, ega);
|
||||
}
|
||||
|
||||
frames++;
|
||||
@@ -658,7 +658,7 @@ ega_poll(void *p)
|
||||
|
||||
|
||||
void
|
||||
ega_doblit(int y1, int y2, int wx, int wy, ega_t *ega)
|
||||
ega_doblit(int wx, int wy, ega_t *ega)
|
||||
{
|
||||
int y_add = (enable_overscan) ? overscan_y : 0;
|
||||
int x_add = (enable_overscan) ? overscan_x : 0;
|
||||
@@ -675,15 +675,8 @@ ega_doblit(int y1, int y2, int wx, int wy, ega_t *ega)
|
||||
bottom <<= 1;
|
||||
}
|
||||
|
||||
if ((wx <= 0) || (wy <= 0)) {
|
||||
video_blit_memtoscreen(x_start, y_start, 0, 0, 0, 0);
|
||||
if ((wx <= 0) || (wy <= 0))
|
||||
return;
|
||||
}
|
||||
|
||||
if (y1 > y2) {
|
||||
video_blit_memtoscreen(x_start, y_start, 0, 0, xsize + x_add, ysize + y_add);
|
||||
return;
|
||||
}
|
||||
|
||||
if (ega->vres)
|
||||
ega->y_add <<= 1;
|
||||
@@ -734,7 +727,7 @@ ega_doblit(int y1, int y2, int wx, int wy, ega_t *ega)
|
||||
}
|
||||
}
|
||||
|
||||
video_blit_memtoscreen(x_start, y_start, y1, y2 + y_add, xsize + x_add, ysize + y_add);
|
||||
video_blit_memtoscreen(x_start, y_start, xsize + x_add, ysize + y_add);
|
||||
|
||||
if (ega->vres)
|
||||
ega->y_add >>= 1;
|
||||
|
||||
@@ -584,7 +584,7 @@ static void f82c425_poll(void *p)
|
||||
if (video_force_resize_get())
|
||||
video_force_resize_set(0);
|
||||
}
|
||||
video_blit_memtoscreen(0, 0, 0, ysize, xsize, ysize);
|
||||
video_blit_memtoscreen(0, 0, xsize, ysize);
|
||||
frames++;
|
||||
|
||||
/* Fixed 640x200 resolution */
|
||||
|
||||
@@ -689,7 +689,7 @@ genius_poll(void *p)
|
||||
video_force_resize_set(0);
|
||||
}
|
||||
|
||||
video_blit_memtoscreen_8(0, 0, 0, ysize, xsize, ysize);
|
||||
video_blit_memtoscreen_8(0, 0, xsize, ysize);
|
||||
|
||||
frames++;
|
||||
/* Fixed 728x1008 resolution */
|
||||
|
||||
@@ -517,9 +517,9 @@ hercules_poll(void *priv)
|
||||
}
|
||||
|
||||
if (enable_overscan)
|
||||
video_blit_memtoscreen_8(0, dev->firstline, 0, ysize + 28, xsize + 16, ysize + 28);
|
||||
video_blit_memtoscreen_8(0, dev->firstline, xsize + 16, ysize + 28);
|
||||
else
|
||||
video_blit_memtoscreen_8(8, dev->firstline + 14, 0, ysize + 14, xsize, ysize);
|
||||
video_blit_memtoscreen_8(8, dev->firstline + 14, xsize, ysize);
|
||||
frames++;
|
||||
// if ((dev->ctrl & 2) && (dev->ctrl2 & 1)) {
|
||||
if (dev->ctrl & 0x02) {
|
||||
|
||||
@@ -581,7 +581,7 @@ herculesplus_poll(void *priv)
|
||||
if (video_force_resize_get())
|
||||
video_force_resize_set(0);
|
||||
}
|
||||
video_blit_memtoscreen_8(0, dev->firstline, 0, dev->lastline - dev->firstline, xsize, dev->lastline - dev->firstline);
|
||||
video_blit_memtoscreen_8(0, dev->firstline, xsize, dev->lastline - dev->firstline);
|
||||
frames++;
|
||||
if ((dev->ctrl & HERCULESPLUS_CTRL_GRAPH) && (dev->ctrl2 & HERCULESPLUS_CTRL2_GRAPH)) {
|
||||
video_res_x = dev->crtc[1] * 16;
|
||||
|
||||
@@ -998,7 +998,7 @@ incolor_poll(void *priv)
|
||||
if (video_force_resize_get())
|
||||
video_force_resize_set(0);
|
||||
}
|
||||
video_blit_memtoscreen(0, dev->firstline, 0, dev->lastline - dev->firstline, xsize, dev->lastline - dev->firstline);
|
||||
video_blit_memtoscreen(0, dev->firstline, xsize, dev->lastline - dev->firstline);
|
||||
frames++;
|
||||
if ((dev->ctrl & INCOLOR_CTRL_GRAPH) && (dev->ctrl2 & INCOLOR_CTRL2_GRAPH)) {
|
||||
video_res_x = dev->crtc[1] * 16;
|
||||
|
||||
@@ -230,7 +230,7 @@ void mda_poll(void *p)
|
||||
if (video_force_resize_get())
|
||||
video_force_resize_set(0);
|
||||
}
|
||||
video_blit_memtoscreen_8(0, mda->firstline, 0, ysize, xsize, ysize);
|
||||
video_blit_memtoscreen_8(0, mda->firstline, xsize, ysize);
|
||||
frames++;
|
||||
video_res_x = mda->crtc[1];
|
||||
video_res_y = mda->crtc[6];
|
||||
|
||||
@@ -474,17 +474,17 @@ nga_poll(void *priv)
|
||||
/* nga specific */
|
||||
if (enable_overscan) {
|
||||
if (nga->cga.composite)
|
||||
video_blit_memtoscreen(0, (nga->cga.firstline - 8), 0, (nga->cga.lastline - nga->cga.firstline) + 16,
|
||||
video_blit_memtoscreen(0, (nga->cga.firstline - 8),
|
||||
xsize, (nga->cga.lastline - nga->cga.firstline) + 16);
|
||||
else
|
||||
video_blit_memtoscreen_8(0, (nga->cga.firstline - 8), 0, (nga->cga.lastline - nga->cga.firstline) + 16,
|
||||
video_blit_memtoscreen_8(0, (nga->cga.firstline - 8),
|
||||
xsize, (nga->cga.lastline - nga->cga.firstline) + 16);
|
||||
} else {
|
||||
if (nga->cga.composite)
|
||||
video_blit_memtoscreen(8, nga->cga.firstline, 0, (nga->cga.lastline - nga->cga.firstline),
|
||||
video_blit_memtoscreen(8, nga->cga.firstline,
|
||||
xsize, (nga->cga.lastline - nga->cga.firstline));
|
||||
else
|
||||
video_blit_memtoscreen_8(8, nga->cga.firstline, 0, (nga->cga.lastline - nga->cga.firstline),
|
||||
video_blit_memtoscreen_8(8, nga->cga.firstline,
|
||||
xsize, (nga->cga.lastline - nga->cga.firstline));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -489,17 +489,17 @@ ogc_poll(void *priv)
|
||||
/* ogc specific */
|
||||
if (enable_overscan) {
|
||||
if (ogc->cga.composite)
|
||||
video_blit_memtoscreen(0, (ogc->cga.firstline - 8), 0, (ogc->cga.lastline - ogc->cga.firstline) + 16,
|
||||
video_blit_memtoscreen(0, (ogc->cga.firstline - 8),
|
||||
xsize, (ogc->cga.lastline - ogc->cga.firstline) + 16);
|
||||
else
|
||||
video_blit_memtoscreen_8(0, (ogc->cga.firstline - 8), 0, (ogc->cga.lastline - ogc->cga.firstline) + 16,
|
||||
video_blit_memtoscreen_8(0, (ogc->cga.firstline - 8),
|
||||
xsize, (ogc->cga.lastline - ogc->cga.firstline) + 16);
|
||||
} else {
|
||||
if (ogc->cga.composite)
|
||||
video_blit_memtoscreen(8, ogc->cga.firstline, 0, (ogc->cga.lastline - ogc->cga.firstline),
|
||||
video_blit_memtoscreen(8, ogc->cga.firstline,
|
||||
xsize, (ogc->cga.lastline - ogc->cga.firstline));
|
||||
else
|
||||
video_blit_memtoscreen_8(8, ogc->cga.firstline, 0, (ogc->cga.lastline - ogc->cga.firstline),
|
||||
video_blit_memtoscreen_8(8, ogc->cga.firstline,
|
||||
xsize, (ogc->cga.lastline - ogc->cga.firstline));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2493,7 +2493,7 @@ pgc_cga_poll(pgc_t *dev)
|
||||
if (video_force_resize_get())
|
||||
video_force_resize_set(0);
|
||||
}
|
||||
video_blit_memtoscreen_8(0, 0, 0, ysize, xsize, ysize);
|
||||
video_blit_memtoscreen_8(0, 0, xsize, ysize);
|
||||
frames++;
|
||||
|
||||
/* We have a fixed 640x400 screen for CGA modes. */
|
||||
@@ -2578,7 +2578,7 @@ pgc_poll(void *priv)
|
||||
if (video_force_resize_get())
|
||||
video_force_resize_set(0);
|
||||
}
|
||||
video_blit_memtoscreen(0, 0, 0, ysize, xsize, ysize);
|
||||
video_blit_memtoscreen(0, 0, xsize, ysize);
|
||||
frames++;
|
||||
|
||||
video_res_x = dev->screenw;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -758,7 +758,7 @@ sigma_poll(void *p)
|
||||
video_force_resize_set(0);
|
||||
}
|
||||
|
||||
video_blit_memtoscreen_8(0, sigma->firstline - 4, 0, (sigma->lastline - sigma->firstline) + 8, xsize, (sigma->lastline - sigma->firstline) + 8);
|
||||
video_blit_memtoscreen_8(0, sigma->firstline - 4, xsize, (sigma->lastline - sigma->firstline) + 8);
|
||||
frames++;
|
||||
|
||||
video_res_x = xsize - 16;
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
#include <86box/vid_svga_render.h>
|
||||
|
||||
|
||||
void svga_doblit(int y1, int y2, int wx, int wy, svga_t *svga);
|
||||
void svga_doblit(int wx, int wy, svga_t *svga);
|
||||
|
||||
extern int cyc_total;
|
||||
extern uint8_t edatlookup[4][4];
|
||||
@@ -929,10 +929,10 @@ svga_poll(void *p)
|
||||
if (!svga->override) {
|
||||
if (svga->vertical_linedbl) {
|
||||
wy = (svga->lastline - svga->firstline) << 1;
|
||||
svga_doblit(svga->firstline_draw << 1, (svga->lastline_draw + 1) << 1, wx, wy, svga);
|
||||
svga_doblit(wx, wy, svga);
|
||||
} else {
|
||||
wy = svga->lastline - svga->firstline;
|
||||
svga_doblit(svga->firstline_draw, svga->lastline_draw + 1, wx, wy, svga);
|
||||
svga_doblit(wx, wy, svga);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1450,7 +1450,7 @@ svga_read_linear(uint32_t addr, void *p)
|
||||
|
||||
|
||||
void
|
||||
svga_doblit(int y1, int y2, int wx, int wy, svga_t *svga)
|
||||
svga_doblit(int wx, int wy, svga_t *svga)
|
||||
{
|
||||
int y_add, x_add, y_start, x_start, bottom;
|
||||
uint32_t *p;
|
||||
@@ -1469,15 +1469,8 @@ svga_doblit(int y1, int y2, int wx, int wy, svga_t *svga)
|
||||
bottom <<= 1;
|
||||
}
|
||||
|
||||
if ((wx <= 0) || (wy <= 0)) {
|
||||
video_blit_memtoscreen(x_start, y_start, 0, 0, 0, 0);
|
||||
if ((wx <= 0) || (wy <= 0))
|
||||
return;
|
||||
}
|
||||
|
||||
if (y1 > y2) {
|
||||
video_blit_memtoscreen(x_start, y_start, 0, 0, xsize + x_add, ysize + y_add);
|
||||
return;
|
||||
}
|
||||
|
||||
if (svga->vertical_linedbl)
|
||||
svga->y_add <<= 1;
|
||||
@@ -1531,7 +1524,7 @@ svga_doblit(int y1, int y2, int wx, int wy, svga_t *svga)
|
||||
}
|
||||
}
|
||||
|
||||
video_blit_memtoscreen(x_start, y_start, y1, y2 + y_add, xsize + x_add, ysize + y_add);
|
||||
video_blit_memtoscreen(x_start, y_start, xsize + x_add, ysize + y_add);
|
||||
|
||||
if (svga->vertical_linedbl)
|
||||
svga->vertical_linedbl >>= 1;
|
||||
|
||||
@@ -147,7 +147,8 @@ video_cards[] = {
|
||||
{ "n9_9fx_pci", &s3_9fx_pci_device },
|
||||
{ "px_trio64_pci", &s3_phoenix_trio64_pci_device },
|
||||
{ "elsawin2kprox_pci", &s3_elsa_winner2000_pro_x_pci_device },
|
||||
{ "mirovideo40sv_pci", &s3_mirovideo_40sv_968_pci_device },
|
||||
{ "mirovideo40sv_pci", &s3_mirovideo_40sv_ergo_968_pci_device },
|
||||
{ "px_vision968_pci", &s3_phoenix_vision968_pci_device },
|
||||
{ "spea_mercury64p_pci", &s3_spea_mercury_p64v_pci_device },
|
||||
{ "px_vision868_pci", &s3_phoenix_vision868_pci_device },
|
||||
{ "px_trio64vplus_pci", &s3_phoenix_trio64vplus_pci_device },
|
||||
@@ -191,6 +192,7 @@ video_cards[] = {
|
||||
{ "px_s3_v7_805_vlb", &s3_spea_mirage_86c805_vlb_device },
|
||||
{ "stealth64v_vlb", &s3_diamond_stealth64_964_vlb_device },
|
||||
{ "mirocrystal20sv_vlb", &s3_mirocrystal_20sv_964_vlb_device },
|
||||
{ "mirocrystal20sd_vlb", &s3_mirocrystal_20sd_864_vlb_device },
|
||||
{ "bahamas64_vlb", &s3_bahamas64_vlb_device },
|
||||
{ "px_vision864_vlb", &s3_phoenix_vision864_vlb_device },
|
||||
{ "stealthse_vlb", &s3_diamond_stealth_se_vlb_device },
|
||||
@@ -199,6 +201,7 @@ video_cards[] = {
|
||||
{ "n9_9fx_vlb", &s3_9fx_vlb_device },
|
||||
{ "px_trio64_vlb", &s3_phoenix_trio64_vlb_device },
|
||||
{ "spea_miragep64_vlb", &s3_spea_mirage_p64_vlb_device },
|
||||
{ "px_vision968_vlb", &s3_phoenix_vision968_vlb_device },
|
||||
{ "px_vision868_vlb", &s3_phoenix_vision868_vlb_device },
|
||||
{ "ht216_32", &ht216_32_standalone_device },
|
||||
{ "virge325_vlb", &s3_virge_325_vlb_device },
|
||||
|
||||
@@ -655,7 +655,7 @@ skip_draw:
|
||||
thread_release_mutex(voodoo->force_blit_mutex);
|
||||
|
||||
if (voodoo->dirty_line_high > voodoo->dirty_line_low || force_blit)
|
||||
svga_doblit(0, voodoo->v_disp, voodoo->h_disp, voodoo->v_disp-1, voodoo->svga);
|
||||
svga_doblit(voodoo->h_disp, voodoo->v_disp-1, voodoo->svga);
|
||||
if (voodoo->clutData_dirty)
|
||||
{
|
||||
voodoo->clutData_dirty = 0;
|
||||
|
||||
@@ -870,7 +870,7 @@ void wy700_poll(void *p)
|
||||
if (video_force_resize_get())
|
||||
video_force_resize_set(0);
|
||||
}
|
||||
video_blit_memtoscreen_8(0, 0, 0, ysize, xsize, ysize);
|
||||
video_blit_memtoscreen_8(0, 0, xsize, ysize);
|
||||
|
||||
frames++;
|
||||
/* Fixed 1280x800 resolution */
|
||||
|
||||
@@ -74,7 +74,6 @@
|
||||
|
||||
volatile int screenshots = 0;
|
||||
bitmap_t *buffer32 = NULL;
|
||||
bitmap_t *render_buffer = NULL;
|
||||
uint8_t fontdat[2048][8]; /* IBM CGA font */
|
||||
uint8_t fontdatm[2048][16]; /* IBM MDA font */
|
||||
uint8_t fontdatw[512][32]; /* Wyse700 font */
|
||||
@@ -245,7 +244,7 @@ const uint32_t shade[5][256] =
|
||||
|
||||
|
||||
static struct {
|
||||
int x, y, y1, y2, w, h;
|
||||
int x, y, w, h;
|
||||
int busy;
|
||||
int buffer_in_use;
|
||||
|
||||
@@ -256,7 +255,7 @@ static struct {
|
||||
} blit_data;
|
||||
|
||||
|
||||
static void (*blit_func)(int x, int y, int y1, int y2, int w, int h);
|
||||
static void (*blit_func)(int x, int y, int w, int h);
|
||||
|
||||
|
||||
#ifdef ENABLE_VIDEO_LOG
|
||||
@@ -280,7 +279,7 @@ video_log(const char *fmt, ...)
|
||||
|
||||
|
||||
void
|
||||
video_setblit(void(*blit)(int,int,int,int,int,int))
|
||||
video_setblit(void(*blit)(int,int,int,int))
|
||||
{
|
||||
blit_func = blit;
|
||||
}
|
||||
@@ -318,7 +317,7 @@ static png_infop info_ptr;
|
||||
|
||||
|
||||
static void
|
||||
video_take_screenshot(const char *fn, int startx, int starty, int y1, int y2, int w, int h)
|
||||
video_take_screenshot(const char *fn)
|
||||
{
|
||||
int i, x, y;
|
||||
png_bytep *b_rgb = NULL;
|
||||
@@ -350,25 +349,26 @@ video_take_screenshot(const char *fn, int startx, int starty, int y1, int y2, in
|
||||
|
||||
png_init_io(png_ptr, fp);
|
||||
|
||||
png_set_IHDR(png_ptr, info_ptr, w, h,
|
||||
png_set_IHDR(png_ptr, info_ptr, blit_data.w, blit_data.h,
|
||||
8, PNG_COLOR_TYPE_RGB, PNG_INTERLACE_NONE,
|
||||
PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);
|
||||
|
||||
b_rgb = (png_bytep *) malloc(sizeof(png_bytep) * h);
|
||||
b_rgb = (png_bytep *) malloc(sizeof(png_bytep) * blit_data.h);
|
||||
if (b_rgb == NULL) {
|
||||
video_log("[video_take_screenshot] Unable to Allocate RGB Bitmap Memory");
|
||||
fclose(fp);
|
||||
return;
|
||||
}
|
||||
|
||||
for (y = 0; y < h; ++y) {
|
||||
for (y = 0; y < blit_data.h; ++y) {
|
||||
b_rgb[y] = (png_byte *) malloc(png_get_rowbytes(png_ptr, info_ptr));
|
||||
for (x = 0; x < w; ++x) {
|
||||
temp = render_buffer->dat[(y * w) + x];
|
||||
|
||||
b_rgb[y][(x) * 3 + 0] = (temp >> 16) & 0xff;
|
||||
b_rgb[y][(x) * 3 + 1] = (temp >> 8) & 0xff;
|
||||
b_rgb[y][(x) * 3 + 2] = temp & 0xff;
|
||||
for (x = 0; x < blit_data.w; ++x) {
|
||||
if (buffer32 == NULL)
|
||||
memset(&(b_rgb[y][x * 3]), 0x00, 3);
|
||||
else {
|
||||
temp = buffer32->line[blit_data.y + y][blit_data.x + x];
|
||||
memcpy(&(b_rgb[y][x * 3]), &temp, 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -379,7 +379,7 @@ video_take_screenshot(const char *fn, int startx, int starty, int y1, int y2, in
|
||||
png_write_end(png_ptr, NULL);
|
||||
|
||||
/* cleanup heap allocation */
|
||||
for (i = 0; i < h; i++)
|
||||
for (i = 0; i < blit_data.h; i++)
|
||||
if (b_rgb[i]) free(b_rgb[i]);
|
||||
|
||||
if (b_rgb) free(b_rgb);
|
||||
@@ -389,7 +389,7 @@ video_take_screenshot(const char *fn, int startx, int starty, int y1, int y2, in
|
||||
|
||||
|
||||
static void
|
||||
video_screenshot(int x, int y, int y1, int y2, int w, int h)
|
||||
video_screenshot(void)
|
||||
{
|
||||
char path[1024], fn[128];
|
||||
|
||||
@@ -408,7 +408,7 @@ video_screenshot(int x, int y, int y1, int y2, int w, int h)
|
||||
|
||||
video_log("taking screenshot to: %s\n", path);
|
||||
|
||||
video_take_screenshot((const char *) path, x, y, y1, y2, w, h);
|
||||
video_take_screenshot((const char *) path);
|
||||
png_destroy_write_struct(&png_ptr, &info_ptr);
|
||||
}
|
||||
|
||||
@@ -418,10 +418,12 @@ video_transform_copy(uint32_t *dst, uint32_t *src, int len)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < len; i++) {
|
||||
*dst = video_color_transform(*src);
|
||||
dst++;
|
||||
src++;
|
||||
if ((dst != NULL) && (src != NULL)) {
|
||||
for (i = 0; i < len; i++) {
|
||||
*dst = video_color_transform(*src);
|
||||
dst++;
|
||||
src++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -436,28 +438,22 @@ void blit_thread(void *param)
|
||||
thread_reset_event(blit_data.wake_blit_thread);
|
||||
MTR_BEGIN("video", "blit_thread");
|
||||
|
||||
if (blit_data.y2 > 0) {
|
||||
for (yy = blit_data.y1; yy < blit_data.y2; yy++) {
|
||||
if ((video_grayscale || invert_display) && (blit_data.h > 0)) {
|
||||
for (yy = 0; yy < blit_data.h; yy++) {
|
||||
if (((blit_data.y + yy) >= 0) && ((blit_data.y + yy) < buffer32->h)) {
|
||||
if (video_grayscale || invert_display)
|
||||
video_transform_copy(&(render_buffer->dat)[yy * blit_data.w], &(buffer32->line[blit_data.y + yy][blit_data.x]), blit_data.w);
|
||||
else
|
||||
memcpy(&(render_buffer->dat)[yy * blit_data.w], &(buffer32->line[blit_data.y + yy][blit_data.x]), blit_data.w << 2);
|
||||
video_transform_copy(&(buffer32->line[blit_data.y + yy][blit_data.x]), &(buffer32->line[blit_data.y + yy][blit_data.x]), blit_data.w);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (screenshots) {
|
||||
if (render_buffer != NULL)
|
||||
video_screenshot(blit_data.x, blit_data.y, blit_data.y1, blit_data.y2, blit_data.w, blit_data.h);
|
||||
video_screenshot();
|
||||
screenshots--;
|
||||
video_log("screenshot taken, %i left\n", screenshots);
|
||||
}
|
||||
|
||||
if (blit_func)
|
||||
blit_func(blit_data.x, blit_data.y,
|
||||
blit_data.y1, blit_data.y2,
|
||||
blit_data.w, blit_data.h);
|
||||
blit_func(blit_data.x, blit_data.y, blit_data.w, blit_data.h);
|
||||
|
||||
blit_data.busy = 0;
|
||||
|
||||
@@ -468,7 +464,7 @@ void blit_thread(void *param)
|
||||
|
||||
|
||||
void
|
||||
video_blit_memtoscreen(int x, int y, int y1, int y2, int w, int h)
|
||||
video_blit_memtoscreen(int x, int y, int w, int h)
|
||||
{
|
||||
MTR_BEGIN("video", "video_blit_memtoscreen");
|
||||
|
||||
@@ -481,8 +477,6 @@ video_blit_memtoscreen(int x, int y, int y1, int y2, int w, int h)
|
||||
blit_data.buffer_in_use = 1;
|
||||
blit_data.x = x;
|
||||
blit_data.y = y;
|
||||
blit_data.y1 = y1;
|
||||
blit_data.y2 = y2;
|
||||
blit_data.w = w;
|
||||
blit_data.h = h;
|
||||
|
||||
@@ -546,7 +540,7 @@ video_blend(int x, int y)
|
||||
|
||||
|
||||
void
|
||||
video_blit_memtoscreen_8(int x, int y, int y1, int y2, int w, int h)
|
||||
video_blit_memtoscreen_8(int x, int y, int w, int h)
|
||||
{
|
||||
int yy, xx;
|
||||
|
||||
@@ -563,7 +557,7 @@ video_blit_memtoscreen_8(int x, int y, int y1, int y2, int w, int h)
|
||||
}
|
||||
}
|
||||
|
||||
video_blit_memtoscreen(x, y, y1, y2, w, h);
|
||||
video_blit_memtoscreen(x, y, w, h);
|
||||
}
|
||||
|
||||
|
||||
@@ -833,7 +827,6 @@ video_init(void)
|
||||
|
||||
/* Account for overscan. */
|
||||
buffer32 = create_bitmap(2048 + 64, 2048 + 64);
|
||||
render_buffer = create_bitmap(2048 + 64, 2048 + 64);
|
||||
|
||||
for (c = 0; c < 64; c++) {
|
||||
cgapal[c + 64].r = (((c & 4) ? 2 : 0) | ((c & 0x10) ? 1 : 0)) * 21;
|
||||
@@ -902,7 +895,6 @@ video_close(void)
|
||||
free(video_8togs);
|
||||
free(video_6to8);
|
||||
|
||||
destroy_bitmap(render_buffer);
|
||||
destroy_bitmap(buffer32);
|
||||
|
||||
if (fontdatksc5601) {
|
||||
|
||||
@@ -167,16 +167,19 @@ vnc_display(rfbClientPtr cl)
|
||||
|
||||
|
||||
static void
|
||||
vnc_blit(int x, int y, int y1, int y2, int w, int h)
|
||||
vnc_blit(int x, int y, int w, int h)
|
||||
{
|
||||
uint32_t *p;
|
||||
int yy;
|
||||
|
||||
for (yy=y1; yy<y2; yy++) {
|
||||
if (h <= 0)
|
||||
return;
|
||||
|
||||
for (yy=0; yy<h; yy++) {
|
||||
p = (uint32_t *)&(((uint32_t *)rfb->frameBuffer)[yy*VNC_MAX_X]);
|
||||
|
||||
if ((y+yy) >= 0 && (y+yy) < VNC_MAX_Y)
|
||||
memcpy(p, &(render_buffer->dat[yy * w]), w*4);
|
||||
memcpy(p, &(buffer32->line[yy]), w*sizeof(uint32_t));
|
||||
}
|
||||
|
||||
video_blit_complete();
|
||||
|
||||
@@ -32,4 +32,18 @@
|
||||
<activeCodePage xmlns="http://schemas.microsoft.com/SMI/2019/WindowsSettings">UTF-8</activeCodePage>
|
||||
</windowsSettings>
|
||||
</application>
|
||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||
<application>
|
||||
<!-- Windows 10 -->
|
||||
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
|
||||
<!-- Windows 8.1 -->
|
||||
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
|
||||
<!-- Windows 8 -->
|
||||
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
|
||||
<!-- Windows 7 -->
|
||||
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
|
||||
<!-- Windows Vista -->
|
||||
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
|
||||
</application>
|
||||
</compatibility>
|
||||
</assembly>
|
||||
|
||||
@@ -808,21 +808,27 @@ static void opengl_main(void* param)
|
||||
CoUninitialize();
|
||||
}
|
||||
|
||||
static void opengl_blit(int x, int y, int y1, int y2, int w, int h)
|
||||
static void opengl_blit(int x, int y, int w, int h)
|
||||
{
|
||||
if (y1 == y2 || h <= 0 || render_buffer == NULL || thread == NULL ||
|
||||
int yy;
|
||||
|
||||
if ((h <= 0) || (buffer32 == NULL) || (thread == NULL) ||
|
||||
atomic_flag_test_and_set(&blit_info[write_pos].in_use))
|
||||
{
|
||||
video_blit_complete();
|
||||
return;
|
||||
}
|
||||
|
||||
memcpy(blit_info[write_pos].buffer, &(render_buffer->dat)[y1 * w], w * (y2 - y1) * sizeof(uint32_t));
|
||||
for (yy = 0; yy < h; yy++) {
|
||||
if ((y + yy) >= 0 && (y + yy) < buffer32->h)
|
||||
memcpy(blit_info[write_pos].buffer + (yy * w * sizeof(uint32_t)),
|
||||
&(((uint32_t *) buffer32->line[y + yy])[x]), w * sizeof(uint32_t));
|
||||
}
|
||||
|
||||
video_blit_complete();
|
||||
|
||||
blit_info[write_pos].y1 = y1;
|
||||
blit_info[write_pos].y2 = y2;
|
||||
blit_info[write_pos].y1 = 0;
|
||||
blit_info[write_pos].y2 = h - 1;
|
||||
blit_info[write_pos].w = w;
|
||||
blit_info[write_pos].h = h;
|
||||
|
||||
|
||||
@@ -229,29 +229,29 @@ sdl_stretch(int *w, int *h, int *x, int *y)
|
||||
|
||||
|
||||
static void
|
||||
sdl_blit(int x, int y, int y1, int y2, int w, int h)
|
||||
sdl_blit(int x, int y, int w, int h)
|
||||
{
|
||||
SDL_Rect r_src;
|
||||
int ret;
|
||||
|
||||
if (!sdl_enabled || (y1 == y2) || (h <= 0) || (render_buffer == NULL) || (sdl_render == NULL) || (sdl_tex == NULL)) {
|
||||
if (!sdl_enabled || (h <= 0) || (buffer32 == NULL) || (sdl_render == NULL) || (sdl_tex == NULL)) {
|
||||
video_blit_complete();
|
||||
return;
|
||||
}
|
||||
|
||||
SDL_LockMutex(sdl_mutex);
|
||||
|
||||
r_src.x = 0;
|
||||
r_src.y = y1;
|
||||
r_src.x = x;
|
||||
r_src.y = y;
|
||||
r_src.w = w;
|
||||
r_src.h = y2 - y1;
|
||||
SDL_UpdateTexture(sdl_tex, &r_src, &(render_buffer->dat)[y1 * w], w * 4);
|
||||
r_src.h = h;
|
||||
SDL_UpdateTexture(sdl_tex, &r_src, &(buffer32->line[y][x]), (2048 + 64) * sizeof(uint32_t));
|
||||
video_blit_complete();
|
||||
|
||||
SDL_RenderClear(sdl_render);
|
||||
|
||||
r_src.x = 0;
|
||||
r_src.y = 0;
|
||||
r_src.x = x;
|
||||
r_src.y = y;
|
||||
r_src.w = w;
|
||||
r_src.h = h;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user