Comments (11)
Yes, I just verified #18 and it seemed to work fine. I did not find any issues with it.
from d3d8to9.
auto &rt = _current_rendertarget;
auto &ds = _current_depthstencil;
if (rt != nullptr && ds != nullptr && myRef <= 3)
{
rt->Release(); rt = nullptr;
ds->Release(); ds = nullptr;
}
else if (rt != nullptr && myRef <= 2)
{
rt->Release(); rt = nullptr;
}
else if (ds != nullptr && myRef <= 2)
{
ds->Release(); ds = nullptr;
}
from d3d8to9.
I don't think those changes are safe. I tried that with one of my games (Rayman 3: Hoodlum Havoc) and it crashed on exit, whereas it never crashed before. Event Viewer showed it as crashing in d3d8.dll (this wrapper).
from d3d8to9.
Mmh. Well, then it's probably better to follow the "Never change a running system" matra.
from d3d8to9.
Ok, if I change the declaration then it works without crashing:
auto* rt = _current_rendertarget;
auto* ds = _current_depthstencil;
if (rt != nullptr && ds != nullptr && myRef <= 3)
{
rt->Release(); rt = nullptr;
ds->Release(); ds = nullptr;
}
else if (rt != nullptr && myRef <= 2)
{
rt->Release(); rt = nullptr;
}
else if (ds != nullptr && myRef <= 2)
{
ds->Release(); ds = nullptr;
}
from d3d8to9.
That doesn't reset the fields to nullptr
though, which is bad too.
from d3d8to9.
Indeed, auto&
shouldn't be used in here. But other than this, it looks good and it does reset the fields to nullptr
(missed the assignments after Release()
, crosire?).
The only thing I'd change is <=
to ==
- defensive approach is really not needed in here, I guess.
from d3d8to9.
Yes, that code seems to work for me. No crashes or other issues.
from d3d8to9.
The one I posted in here was wrong again though (too sleepy, it seems). I'll fix and issue a PR.
from d3d8to9.
No, it doesn't reset the fields to nullptr
. It only sets the local auto
variables to nullptr
. But I see you fixed that in the PR.
from d3d8to9.
I don't have any way to test #18 currently, so would greatly appreciate if @elishacloud could verify things still work with it.
from d3d8to9.
Related Issues (20)
- How to use d3d8to9 with Gentool ? HOT 5
- Dear Crosire!Please help with Correcting/Remove night pixelshader effect of Operation Flashpoint 1.96 HOT 53
- Mafia The City Lost Heaven HOT 2
- [Crash] Pro Evolution Soccer 3 HOT 2
- Max Payne - WS Fix not working HOT 3
- .
- Consider collaborating with the d8vk project? HOT 1
- Consider recommending D3DX from NuGet instead of an old DirectX SDK HOT 3
- Ballistics (2001) - Junk polygons in menus
- C:\Microsoft\Cpp\Default\props not found HOT 1
- Rome Total War - Campaign Map Texture Issue HOT 6
- D3D8.1 Pixel and Vertex Shader Lifetimes Seem To Be Incorrect HOT 1
- Problems with character models. Pangya
- Latest update crashes Silent Hill 2 in SetVertexShader() HOT 4
- v1.11.1 - Max Payne - Loading Screen Errors / Missing Sounds
- Fellowship of the Ring black screen on startup/uncapped frame rate HOT 1
- uhh
- NVCP multi sampling anti-aliasing doesn't work. I tried everything. Metin2 is the game. HOT 1
- [Suggestion] The Bard's Tale (2005) - Solve the slowness of some parts... HOT 1
- Fixing 3dwinxp screensaver working experience
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from d3d8to9.