Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fic vector games #96

Merged
merged 2 commits into from Feb 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,18 @@ IS_X86 = 0
TARGET_NAME = mame2000

CORE_DIR = .
CFLAGS += -fsigned-char

ifeq (,$(findstring msvc,$(platform)))
GCC_DEFINES := -Wno-sign-compare -Wunused -Wpointer-arith -Waggregate-return -Wshadow
endif

ifneq ($(SANITIZER),)
CFLAGS := -fsanitize=$(SANITIZER) $(CFLAGS)
CXXFLAGS := -fsanitize=$(SANITIZER) $(CXXFLAGS)
LDFLAGS := -fsanitize=$(SANITIZER) $(LDFLAGS)
endif

GIT_VERSION ?= " $(shell git rev-parse --short HEAD || echo unknown)"
ifneq ($(GIT_VERSION)," unknown")
CFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\"
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/tempest.c
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ static struct MachineDriver machine_driver_tempest =
0,

/* video hardware */
300, 400, { 0, 550, 0, 580 },
400, 300, { 0, 580, 0, 570 },
0,
256,0,
avg_init_palette_multi,
Expand Down
13 changes: 7 additions & 6 deletions src/libretro/libretro.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ extern short *samples_buffer;
extern short *conversion_buffer;
extern int joy_pressed[40];
extern int key[KEY_MAX];

extern char *nvdir, *hidir, *cfgdir, *inpdir, *stadir, *memcarddir;
extern char *artworkdir, *screenshotdir, *alternate_name;
extern char *cheatdir;
Expand Down Expand Up @@ -657,15 +656,17 @@ void retro_get_system_info(struct retro_system_info *info)

void retro_get_system_av_info(struct retro_system_av_info *info)
{

float aspect_ratio = Machine->orientation & ORIENTATION_SWAP_XY? ( (float) 3 / (float) 4) : ( (float) 4/ (float) 3);
#ifndef WANT_LIBCO
lock_mame();
#endif
struct retro_game_geometry g = {
Machine->drv->screen_width,
Machine->drv->screen_height,
Machine->drv->screen_width,
Machine->drv->screen_height,
((float) Machine->drv->screen_width / Machine->drv->screen_height) * ((Machine->drv->video_attributes & VIDEO_PIXEL_ASPECT_RATIO_MASK) == VIDEO_PIXEL_ASPECT_RATIO_1_2 ? 0.5f : 1.0f)
emulated_width,
emulated_height,
emulated_width,
emulated_height,
aspect_ratio
};
struct retro_system_timing t = {
Machine->drv->frames_per_second,
Expand Down
5 changes: 2 additions & 3 deletions src/libretro/video.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ int wait_vsync;
int vsync_frame_rate;
int skiplines;
int skipcolumns;
int use_dirty;
int use_dirty = -1;
float osd_gamma_correction = 1.0;
int brightness;
float brightness_paused_adjust;
Expand Down Expand Up @@ -476,11 +476,10 @@ Returns 0 on success.
*/
int osd_create_display(int width,int height,int depth,int fps,int attributes,int orientation)
{
logerror("width %d, height %d\n", width,height);
printf("width %d, height %d\n", width,height);

video_depth = depth;
video_fps = fps;

brightness = 100;
brightness_paused_adjust = 1.0;
dirty_bright = 1;
Expand Down
4 changes: 2 additions & 2 deletions src/mame.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ int run_game(int game)

if(!iOS_fixedRes)
{
if (options.vector_width == 0) options.vector_width = 640;
if (options.vector_height == 0) options.vector_height = 480;
options.vector_width = 640;
options.vector_height = 480;
}
else
{
Expand Down