mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-01-16 20:31:16 +00:00
Fix m_callbacks resource issue (#289)
This commit is contained in:
parent
098e2a6894
commit
b95ca4b2a3
@ -268,7 +268,7 @@ void Direct3DRMSoftwareRenderer::DrawTriangleProjected(
|
|||||||
|
|
||||||
Uint8 r, g, b;
|
Uint8 r, g, b;
|
||||||
SDL_Color c0 = ApplyLighting(v0.position, v0.normal, appearance);
|
SDL_Color c0 = ApplyLighting(v0.position, v0.normal, appearance);
|
||||||
SDL_Color c1, c2;
|
SDL_Color c1 = {}, c2 = {};
|
||||||
if (!appearance.flat) {
|
if (!appearance.flat) {
|
||||||
c1 = ApplyLighting(v1.position, v1.normal, appearance);
|
c1 = ApplyLighting(v1.position, v1.normal, appearance);
|
||||||
c2 = ApplyLighting(v2.position, v2.normal, appearance);
|
c2 = ApplyLighting(v2.position, v2.normal, appearance);
|
||||||
|
|||||||
@ -14,8 +14,8 @@
|
|||||||
#include <functional>
|
#include <functional>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
Direct3DRMViewportImpl::Direct3DRMViewportImpl(DWORD width, DWORD height, Direct3DRMRenderer* rendere)
|
Direct3DRMViewportImpl::Direct3DRMViewportImpl(DWORD width, DWORD height, Direct3DRMRenderer* renderer)
|
||||||
: m_width(width), m_height(height), m_renderer(rendere)
|
: m_width(width), m_height(height), m_renderer(renderer)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -7,6 +7,13 @@
|
|||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct Direct3DRMObjectBaseImpl : public T {
|
struct Direct3DRMObjectBaseImpl : public T {
|
||||||
|
Direct3DRMObjectBaseImpl() : T() {}
|
||||||
|
Direct3DRMObjectBaseImpl(const Direct3DRMObjectBaseImpl& other) : m_appData(other.m_appData), T(other)
|
||||||
|
{
|
||||||
|
if (other.m_name) {
|
||||||
|
m_name = SDL_strdup(other.m_name);
|
||||||
|
}
|
||||||
|
}
|
||||||
ULONG Release() override
|
ULONG Release() override
|
||||||
{
|
{
|
||||||
if (T::m_refCount == 1) {
|
if (T::m_refCount == 1) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user