From 54e28e4bf527c01f31d1c2eef162344146caf08d Mon Sep 17 00:00:00 2001 From: Dimitris Panokostas Date: Thu, 2 Feb 2017 23:19:09 +0100 Subject: [PATCH] Code cleanup and improvements --- VisualGDB/Amiberry/Amiberry-Release.vgdbsettings | 3 ++- src/drawing.cpp | 4 ++++ src/include/fpp-ieee-be.h | 3 +++ src/include/fpp-unknown.h | 2 ++ src/main.cpp | 4 ++-- 5 files changed, 13 insertions(+), 3 deletions(-) diff --git a/VisualGDB/Amiberry/Amiberry-Release.vgdbsettings b/VisualGDB/Amiberry/Amiberry-Release.vgdbsettings index 3f857f4e..6e6efe69 100644 --- a/VisualGDB/Amiberry/Amiberry-Release.vgdbsettings +++ b/VisualGDB/Amiberry/Amiberry-Release.vgdbsettings @@ -34,6 +34,7 @@ true true + false false @@ -148,7 +149,7 @@ - Unknown + False diff --git a/src/drawing.cpp b/src/drawing.cpp index 60144ecf..c2197163 100644 --- a/src/drawing.cpp +++ b/src/drawing.cpp @@ -1866,6 +1866,10 @@ void init_row_map() row_map[i] = row_tmp; for (i = 0 , j = 0; i < gfxvidinfo.outheight; i++ , j += gfxvidinfo.rowbytes) row_map[i] = gfxvidinfo.bufmem + j; + + oldbufmem = gfxvidinfo.bufmem; + oldheight = gfxvidinfo.outheight; + oldpitch = gfxvidinfo.rowbytes; } static void init_aspect_maps() diff --git a/src/include/fpp-ieee-be.h b/src/include/fpp-ieee-be.h index 138be520..21420b4c 100644 --- a/src/include/fpp-ieee-be.h +++ b/src/include/fpp-ieee-be.h @@ -9,6 +9,9 @@ * Copyright 1999 Sam Jordan */ +#pragma once +#include "sysdeps.h" + STATIC_INLINE double to_single (uae_u32 value) { union diff --git a/src/include/fpp-unknown.h b/src/include/fpp-unknown.h index 6b90abe8..404a5eb5 100644 --- a/src/include/fpp-unknown.h +++ b/src/include/fpp-unknown.h @@ -8,6 +8,8 @@ * Copyright 1996 Herman ten Brugge */ +#pragma once +#include "sysdeps.h" #ifndef HAVE_to_single STATIC_INLINE double to_single (uae_u32 value) { diff --git a/src/main.cpp b/src/main.cpp index d19e2cf0..85e1c173 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -640,9 +640,9 @@ void virtualdevice_init() // In case of error, print the error code and close the application void check_error_sdl(bool check, const char* message) { if (check) { - std::cout << message << " " << SDL_GetError() << std::endl; + cout << message << " " << SDL_GetError() << endl; SDL_Quit(); - std::exit(-1); + exit(-1); } }