Fix some compile errors, not sure if all(nw)

This commit is contained in:
therealmogminer@gmail.com 2016-02-21 03:52:22 +01:00
parent bf033cfe00
commit c13089a065
50 changed files with 454 additions and 41 deletions

View File

@ -7,10 +7,12 @@
//============================================================
// standard windows headers
#ifdef OSD_WINDOWS
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <windowsx.h>
#include <mmsystem.h>
#endif
#include "osdwindow.h"

View File

@ -1,3 +1,11 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
//============================================================
//
// blendreader.cpp - BGFX blend state JSON reader
//
//============================================================
#include <bgfx/bgfx.h>
#include "blendreader.h"

View File

@ -1,3 +1,11 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
//============================================================
//
// blendreader.h - BGFX blend state JSON reader
//
//============================================================
#pragma once
#ifndef __DRAWBGFX_BLEND_READER__

View File

@ -1,3 +1,11 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
//============================================================
//
// chain.cpp - BGFX screen-space post-effect chain
//
//============================================================
#include "slider.h"
#include "parameter.h"
#include "chainentry.h"

View File

@ -1,3 +1,11 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
//============================================================
//
// chain.h - BGFX screen-space post-effect chain
//
//============================================================
#pragma once
#ifndef __DRAWBGFX_CHAIN__

View File

@ -1,3 +1,14 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
//============================================================
//
// chainentry.cpp - BGFX shader post-processing node
//
// Represents a single entry in a list of post-processing
// passes to be applied to a screen quad or buffer.
//
//============================================================
#include "emu.h"
#include <bgfx/bgfx.h>

View File

@ -1,3 +1,14 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
//============================================================
//
// chainentry.h - BGFX shader post-processing node
//
// Represents a single entry in a list of post-processing
// passes to be applied to a screen quad or buffer.
//
//============================================================
#pragma once
#ifndef __DRAWBGFX_CHAIN_ENTRY__

View File

@ -1,3 +1,11 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
//============================================================
//
// chainentryreader.cpp - BGFX chain entry JSON reader
//
//============================================================
#include <string>
#include "emu.h"

View File

@ -1,3 +1,11 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
//============================================================
//
// chainentryreader.h - BGFX chain entry JSON reader
//
//============================================================
#pragma once
#ifndef __DRAWBGFX_CHAIN_ENTRY_READER__

View File

@ -1,3 +1,11 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
//============================================================
//
// chainreader.cpp - BGFX chain JSON reader
//
//============================================================
#include <string>
#include <vector>

View File

@ -1,3 +1,11 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
//============================================================
//
// chainreader.h - BGFX chain JSON reader
//
//============================================================
#pragma once
#ifndef __DRAWBGFX_CHAIN_READER__

View File

@ -1,3 +1,11 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
//============================================================
//
// cullreader.cpp - BGFX cull state JSON reader
//
//============================================================
#include <bgfx/bgfx.h>
#include "cullreader.h"

View File

@ -1,3 +1,11 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
//============================================================
//
// cullreader.h - BGFX cull state JSON reader
//
//============================================================
#pragma once
#ifndef __DRAWBGFX_CULL_READER__

View File

@ -1,3 +1,11 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
//============================================================
//
// depthreader.cpp - BGFX depth state JSON reader
//
//============================================================
#include <bgfx/bgfx.h>
#include "depthreader.h"

View File

@ -1,3 +1,11 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
//============================================================
//
// depthreader.h - BGFX depth state JSON reader
//
//============================================================
#pragma once
#ifndef __DRAWBGFX_DEPTH_READER__

View File

@ -1,3 +1,11 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
//============================================================
//
// effect.cpp - BGFX shader material to be applied to a mesh
//
//============================================================
#include "effect.h"
bgfx_effect::bgfx_effect(uint64_t state, bgfx::ShaderHandle vertex_shader, bgfx::ShaderHandle fragment_shader, std::vector<bgfx_uniform*> uniforms)

View File

@ -1,3 +1,11 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
//============================================================
//
// effect.h - BGFX shader material to be applied to a mesh
//
//============================================================
#pragma once
#ifndef __DRAWBGFX_EFFECT__

View File

@ -1,3 +1,14 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
//============================================================
//
// effectmanager.cpp - BGFX shader effect manager
//
// Maintains a string-to-entry lookup of BGFX shader
// effects, defined by effect.h and read by effectreader.h
//
//============================================================
#include "emu.h"
#include <rapidjson/document.h>

View File

@ -1,3 +1,14 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
//============================================================
//
// effectmanager.h - BGFX shader effect manager
//
// Maintains a string-to-entry lookup of BGFX shader
// effects, defined by effect.h and read by effectreader.h
//
//============================================================
#pragma once
#ifndef __DRAWBGFX_EFFECT_MANAGER__

View File

@ -1,3 +1,11 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
//============================================================
//
// effectreader.cpp - BGFX effect JSON reader
//
//============================================================
#include <string>
#include <bgfx/bgfx.h>

View File

@ -1,3 +1,11 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
//============================================================
//
// effectreader.h - BGFX effect JSON reader
//
//============================================================
#pragma once
#ifndef __DRAWBGFX_EFFECT_READER__

View File

@ -1,3 +1,14 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
//============================================================
//
// inputpair.h - BGFX sampler-and-texture pair
//
// Keeps track of the texture which is bound to the sampler
// which is bound to the specified stage index.
//
//============================================================
#include "inputpair.h"
#include "texture.h"
#include "effect.h"

View File

@ -1,3 +1,14 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
//============================================================
//
// inputpair.h - BGFX sampler-and-texture pair
//
// Keeps track of the texture which is bound to the sampler
// which is bound to the specified stage index.
//
//============================================================
#pragma once
#ifndef __DRAWBGFX_INPUT_PAIR__

View File

@ -1,5 +1,19 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
//============================================================
//
// parameter.cpp - BGFX shader parameter
//
// A value that represents some form of parametric
// operation, which can be fed to the input of a BGFX
// shader uniform.
//
//============================================================
#include "emu.h"
// NB: NOT FINISHED!
#include "parameter.h"
bgfx_parameter::bgfx_parameter(std::string name, parameter_type type, int period)
@ -16,14 +30,27 @@ bgfx_parameter::~bgfx_parameter()
void bgfx_parameter::frame()
{
m_frame++;
if (m_frame == m_period)
switch(m_type)
{
m_frame = 0;
case PARAM_FRAME_MASK:
m_frame++;
if (m_frame == m_period)
{
m_frame = 0;
}
break;
default:
break;
}
}
bool bgfx_parameter::active()
{
return (m_frame % m_period == 0);
switch (m_type)
{
case PARAM_FRAME_MASK:
return (m_frame % m_period == 0);
default:
return false;
}
}

View File

@ -1,3 +1,15 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
//============================================================
//
// parameter.h - BGFX shader parameter
//
// A value that represents some form of parametric
// operation, which can be fed to the input of a BGFX
// shader uniform.
//
//============================================================
#pragma once
#ifndef __DRAWBGFX_PARAMETER__

View File

@ -1,3 +1,11 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
//============================================================
//
// paramreader.cpp - BGFX shader parameter JSON reader
//
//============================================================
#include <string>
#include "paramreader.h"

View File

@ -1,3 +1,11 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
//============================================================
//
// paramreader.h - BGFX shader parameter JSON reader
//
//============================================================
#pragma once
#ifndef __DRAWBGFX_PARAM_READER__

View File

@ -1,3 +1,14 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
//============================================================
//
// shadermanager.cpp - BGFX shader manager
//
// Maintains a mapping between strings and BGFX shaders,
// either vertex or pixel/fragment.
//
//============================================================
#include "emu.h"
#include <bgfx/bgfxplatform.h>

View File

@ -1,3 +1,14 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
//============================================================
//
// shadermanager.h - BGFX shader manager
//
// Maintains a mapping between strings and BGFX shaders,
// either vertex or pixel/fragment.
//
//============================================================
#pragma once
#ifndef __DRAWBGFX_SHADER_MANAGER__

View File

@ -1,3 +1,11 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
//============================================================
//
// slider.cpp - BGFX shader parameter slider
//
//============================================================
#include "emu.h"
#include "slider.h"

View File

@ -1,3 +1,11 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
//============================================================
//
// slider.h - BGFX shader parameter slider
//
//============================================================
#pragma once
#ifndef __DRAWBGFX_SLIDER__

View File

@ -1,3 +1,11 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
//==============================================================
//
// sliderreader.cpp - BGFX shader parameter slider JSON reader
//
//==============================================================
#include "emu.h"
#include "sliderreader.h"

View File

@ -1,3 +1,11 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
//============================================================
//
// sliderreader.h - BGFX shader parameter slider JSON reader
//
//============================================================
#pragma once
#ifndef __DRAWBGFX_SLIDER_READER__

View File

@ -1,3 +1,11 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
//============================================================
//
// target.cpp - Render target abstraction for BGFX layer
//
//============================================================
#include "target.h"
bgfx_target::bgfx_target(std::string name, bgfx::TextureFormat::Enum format, uint32_t width, uint32_t height, bool filter)

View File

@ -1,3 +1,11 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
//============================================================
//
// target.h - Render target abstraction for BGFX layer
//
//============================================================
#pragma once
#ifndef __DRAWBGFX_TARGET__

View File

@ -1,3 +1,14 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
//============================================================
//
// targetmanager.cpp - BGFX render target manager
//
// Maintains a string-to-entry mapping for any registered
// render targets.
//
//============================================================
#include <bgfx/bgfx.h>
#include "targetmanager.h"

View File

@ -1,3 +1,14 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
//============================================================
//
// targetmanager.h - BGFX render target manager
//
// Maintains a string-to-entry mapping for any registered
// render targets.
//
//============================================================
#pragma once
#ifndef __DRAWBGFX_TARGET_MANAGER__

View File

@ -1,3 +1,11 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
//============================================================
//
// texture.cpp - Texture abstraction for BGFX layer
//
//============================================================
#include "emu.h"
#include "texture.h"

View File

@ -1,3 +1,11 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
//============================================================
//
// texture.h - Texture abstraction for BGFX layer
//
//============================================================
#pragma once
#ifndef __DRAWBGFX_TEXTURE__

View File

@ -1,3 +1,14 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
//============================================================
//
// texturemanager.cpp - BGFX texture manager
//
// Maintains a string-to-entry mapping for any registered
// textures.
//
//============================================================
#include <bgfx/bgfx.h>
#include "texturemanager.h"

View File

@ -1,3 +1,14 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
//============================================================
//
// texturemanager.h - BGFX texture manager
//
// Maintains a string-to-entry mapping for any registered
// textures.
//
//============================================================
#pragma once
#ifndef __DRAWBGFX_TEXTURE_MANAGER__

View File

@ -1,3 +1,11 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
//============================================================
//
// uniform.cpp - Shader uniform abstraction for BGFX layer
//
//============================================================
#include "uniform.h"
bgfx_uniform::bgfx_uniform(std::string name, bgfx::UniformType::Enum type)

View File

@ -1,3 +1,11 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
//============================================================
//
// uniform.h - Shader uniform abstraction for BGFX layer
//
//============================================================
#pragma once
#ifndef __DRAWBGFX_UNIFORM__

View File

@ -1,3 +1,11 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
//============================================================
//
// uniformreader.cpp - BGFX shader uniform JSON reader
//
//============================================================
#include "uniformreader.h"
#include "uniform.h"

View File

@ -1,3 +1,11 @@
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
//============================================================
//
// uniformreader.h - BGFX shader uniform JSON reader
//
//============================================================
#pragma once
#ifndef __DRAWBGFX_UNIFORM_READER__

View File

@ -62,7 +62,7 @@ static inline bool is_transparent(const float &a)
renderer_sdl1::renderer_sdl1(osd_window *window, int extra_flags)
: osd_renderer(window, extra_flags)
, m_sdl_renderer(NULL)
, m_sdl_renderer(nullptr)
, m_blittimer(0)
, m_last_hofs(0)
, m_last_vofs(0)
@ -180,7 +180,7 @@ const copy_info_t renderer_sdl1::s_blit_info_default[] =
{ -1 },
};
copy_info_t* renderer_sdl1::s_blit_info[SDL_TEXFORMAT_LAST+1] = { NULL };
copy_info_t* renderer_sdl1::s_blit_info[SDL_TEXFORMAT_LAST+1] = { nullptr };
bool renderer_sdl1::s_blit_info_initialized = false;
//============================================================
@ -261,9 +261,9 @@ void texture_info::render_quad(const render_primitive *prim, const int x, const
set_coloralphamode(m_texture_id, &prim->color);
//printf("%d %d %d %d\n", target_rect.x, target_rect.y, target_rect.w, target_rect.h);
// Arghhh .. Just another bug. SDL_RenderCopy has severe issues with scaling ...
SDL_RenderCopy(m_renderer->m_sdl_renderer, m_texture_id, NULL, &target_rect);
//SDL_RenderCopyEx(m_renderer->m_sdl_renderer, m_texture_id, NULL, &target_rect, 0, NULL, SDL_FLIP_NONE);
//SDL_RenderCopyEx(m_renderer->m_sdl_renderer, m_texture_id, NULL, NULL, 0, NULL, SDL_FLIP_NONE);
SDL_RenderCopy(m_renderer->m_sdl_renderer, m_texture_id, nullptr, &target_rect);
//SDL_RenderCopyEx(m_renderer->m_sdl_renderer, m_texture_id, nullptr, &target_rect, 0, nullptr, SDL_FLIP_NONE);
//SDL_RenderCopyEx(m_renderer->m_sdl_renderer, m_texture_id, nullptr, nullptr, 0, nullptr, SDL_FLIP_NONE);
}
void renderer_sdl1::render_quad(texture_info *texture, const render_primitive *prim, const int x, const int y)
@ -370,13 +370,13 @@ bool renderer_sdl1::init(running_machine &machine)
// Load the GL library now - else MT will fail
const char *stemp = downcast<sdl_options &>(machine.options()).gl_lib();
#else
const char *stemp = NULL;
const char *stemp = nullptr;
#endif
if (stemp != NULL && strcmp(stemp, OSDOPTVAL_AUTO) == 0)
stemp = NULL;
if (stemp != nullptr && strcmp(stemp, OSDOPTVAL_AUTO) == 0)
stemp = nullptr;
// No fatalerror here since not all video drivers support GL !
if (SDL_GL_LoadLibrary(stemp) != 0) // Load library (default for e==NULL
if (SDL_GL_LoadLibrary(stemp) != 0) // Load library (default for e==nullptr
osd_printf_warning("Warning: Unable to load opengl library: %s\n", stemp ? stemp : "<default>");
else
osd_printf_verbose("Loaded opengl shared library: %s\n", stemp ? stemp : "<default>");
@ -408,12 +408,12 @@ static void drawsdl_show_info(struct SDL_RendererInfo *render_info)
RF_ENTRY(SDL_RENDERER_PRESENTVSYNC),
RF_ENTRY(SDL_RENDERER_ACCELERATED),
RF_ENTRY(SDL_RENDERER_TARGETTEXTURE),
{-1, NULL}
{-1, nullptr}
};
int i;
osd_printf_verbose("window: using renderer %s\n", render_info->name ? render_info->name : "<unknown>");
for (i = 0; rflist[i].name != NULL; i++)
for (i = 0; rflist[i].name != nullptr; i++)
if (render_info->flags & rflist[i].flag)
osd_printf_verbose("renderer: flag %s\n", rflist[i].name);
}
@ -500,7 +500,7 @@ void renderer_sdl1::destroy_all_textures()
int renderer_sdl1::draw(int update)
{
render_primitive *prim;
texture_info *texture=NULL;
texture_info *texture=nullptr;
float vofs, hofs;
int blit_pixels = 0;
@ -516,7 +516,7 @@ int renderer_sdl1::draw(int update)
destroy_all_textures();
m_width = wdim.width();
m_height = wdim.height();
SDL_RenderSetViewport(m_sdl_renderer, NULL);
SDL_RenderSetViewport(m_sdl_renderer, nullptr);
m_blittimer = 3;
clear_flags(FI_CHANGED);
}
@ -529,7 +529,7 @@ int renderer_sdl1::draw(int update)
SDL_SetRenderDrawBlendMode(m_sdl_renderer, SDL_BLENDMODE_NONE);
//SDL_SetRenderDrawColor(0,0,0,255);
SDL_SetRenderDrawColor(m_sdl_renderer, 0,0,0,0);
SDL_RenderFillRect(m_sdl_renderer, NULL);
SDL_RenderFillRect(m_sdl_renderer, nullptr);
m_blittimer--;
}
@ -559,7 +559,7 @@ int renderer_sdl1::draw(int update)
window().m_primlist->acquire_lock();
// now draw
for (prim = window().m_primlist->first(); prim != NULL; prim = prim->next())
for (prim = window().m_primlist->first(); prim != nullptr; prim = prim->next())
{
Uint8 sr, sg, sb, sa;
@ -610,10 +610,10 @@ int renderer_sdl1::draw(int update)
copy_info_t *texture_info::compute_size_type()
{
copy_info_t *result = NULL;
copy_info_t *result = nullptr;
int maxperf = 0;
for (copy_info_t *bi = renderer_sdl1::s_blit_info[m_format]; bi != NULL; bi = bi->next)
for (copy_info_t *bi = renderer_sdl1::s_blit_info[m_format]; bi != nullptr; bi = bi->next)
{
if ((m_is_rotated == bi->blitter->m_is_rot)
&& (m_sdl_blendmode == bi->bm_mask))
@ -636,7 +636,7 @@ copy_info_t *texture_info::compute_size_type()
return result;
/* try last resort handlers */
for (copy_info_t *bi = renderer_sdl1::s_blit_info[m_format]; bi != NULL; bi = bi->next)
for (copy_info_t *bi = renderer_sdl1::s_blit_info[m_format]; bi != nullptr; bi = bi->next)
{
if ((m_is_rotated == bi->blitter->m_is_rot)
&& (m_sdl_blendmode == bi->bm_mask))
@ -644,7 +644,7 @@ copy_info_t *texture_info::compute_size_type()
return bi;
}
//FIXME: crash implement a -do nothing handler */
return NULL;
return nullptr;
}
// FIXME:
@ -739,7 +739,7 @@ texture_info::texture_info(renderer_sdl1 *renderer, const render_texinfo &texsou
if (m_sdl_access == SDL_TEXTUREACCESS_STATIC)
{
if (m_copyinfo->blitter->m_is_passthrough)
m_pixels = NULL;
m_pixels = nullptr;
else
m_pixels = malloc(m_setup.rotwidth * m_setup.rotheight * m_copyinfo->blitter->m_dest_bpp);
}
@ -749,7 +749,7 @@ texture_info::texture_info(renderer_sdl1 *renderer, const render_texinfo &texsou
texture_info::~texture_info()
{
if ( is_pixels_owned() && (m_pixels != NULL) )
if ( is_pixels_owned() && (m_pixels != nullptr) )
free(m_pixels);
SDL_DestroyTexture(m_texture_id);
}
@ -773,11 +773,11 @@ void texture_info::set_data(const render_texinfo &texsource, const UINT32 flags)
m_pitch = m_setup.rotwidth * m_copyinfo->blitter->m_dest_bpp;
m_copyinfo->blitter->texop(this, &texsource);
}
SDL_UpdateTexture(m_texture_id, NULL, m_pixels, m_pitch);
SDL_UpdateTexture(m_texture_id, nullptr, m_pixels, m_pitch);
}
else
{
SDL_LockTexture(m_texture_id, NULL, (void **) &m_pixels, &m_pitch);
SDL_LockTexture(m_texture_id, nullptr, (void **) &m_pixels, &m_pitch);
if ( m_copyinfo->blitter->m_is_passthrough )
{
UINT8 *src = (UINT8 *) texsource.base;
@ -872,7 +872,7 @@ texture_info *renderer_sdl1::texture_find(const render_primitive &prim, const qu
osd_ticks_t now = osd_ticks();
// find a match
for (texture = m_texlist.first(); texture != NULL; )
for (texture = m_texlist.first(); texture != nullptr; )
if (texture->hash() == texhash &&
texture->matches(prim, setup))
{
@ -880,7 +880,7 @@ texture_info *renderer_sdl1::texture_find(const render_primitive &prim, const qu
if ((texture->m_copyinfo->samples & 0x7f) == 0x7f)
{
if (texture->m_copyinfo != texture->compute_size_type())
return NULL;
return nullptr;
}
texture->m_last_access = now;
return texture;
@ -895,7 +895,7 @@ texture_info *renderer_sdl1::texture_find(const render_primitive &prim, const qu
}
// nothing found
return NULL;
return nullptr;
}
//============================================================
@ -912,16 +912,16 @@ texture_info * renderer_sdl1::texture_update(const render_primitive &prim)
texture = texture_find(prim, setup);
// if we didn't find one, create a new texture
if (texture == NULL && prim.texture.base != NULL)
if (texture == nullptr && prim.texture.base != nullptr)
{
texture = global_alloc(texture_info(this, prim.texture, setup, prim.flags));
/* add us to the texture list */
m_texlist.prepend(*texture);
}
if (texture != NULL)
if (texture != nullptr)
{
if (prim.texture.base != NULL && texture->texinfo().seqid != prim.texture.seqid)
if (prim.texture.base != nullptr && texture->texinfo().seqid != prim.texture.seqid)
{
texture->texinfo().seqid = prim.texture.seqid;
// if we found it, but with a different seqid, copy the data

View File

@ -161,7 +161,7 @@ public:
{
for (int i = 0; i <= SDL_TEXFORMAT_LAST; i++)
{
for (copy_info_t *bi = s_blit_info[i]; bi != NULL; )
for (copy_info_t *bi = s_blit_info[i]; bi != nullptr; )
{
if (bi->pixel_count)
osd_printf_verbose("%s -> %s %s blendmode 0x%02x, %d samples: %d KPixel/sec\n", bi->srcname, bi->dstname,
@ -171,7 +171,7 @@ public:
bi = bi->next;
global_free(freeme);
}
s_blit_info[i] = NULL;
s_blit_info[i] = nullptr;
}
s_blit_info_initialized = false;
}

View File

@ -16,7 +16,7 @@
renderer_gdi::~renderer_gdi()
{
// free the bitmap memory
if (m_bmdata != NULL)
if (m_bmdata != nullptr)
global_free_array(m_bmdata);
}

View File

@ -31,7 +31,7 @@ class renderer_gdi : public osd_renderer
public:
renderer_gdi(osd_window *window)
: osd_renderer(window, FLAG_NONE)
, m_bmdata(NULL)
, m_bmdata(nullptr)
, m_bmsize(0)
{
}

View File

@ -22,10 +22,10 @@ public:
renderer_sdl2(osd_window *w, int extra_flags)
: osd_renderer(w, extra_flags)
, m_sdl_renderer(NULL)
, m_texture_id(NULL)
, m_yuv_lookup(NULL)
, m_yuv_bitmap(NULL)
, m_sdl_renderer(nullptr)
, m_texture_id(nullptr)
, m_yuv_lookup(nullptr)
, m_yuv_bitmap(nullptr)
//, m_hw_scale_width(0)
//, m_hw_scale_height(0)
, m_last_hofs(0)