summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface/Device.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2017-04-09 17:27:20 -0400
committerLioncash <mathew1800@gmail.com>2017-05-28 23:28:00 -0400
commitd6b6b070bc483eef5fb4d5fd856ab271f3905375 (patch)
tree9cc65304eb41d4e300cf0a6a7fe69d3069b269a2 /Source/Core/InputCommon/ControllerInterface/Device.cpp
parent278e406f0b7becf5ae313f342ad7c5e40a68fb85 (diff)
D3D/Render: Get rid of undefined behavior in Create3DVisionTexture
pSysMem is of the type const void* -- because of this, it makes the original delete[] call undefined behavior, as deleting a void pointer is undefined behavior. Also punning types into existence, like what was done for the stereo image header is undefined behavior as well. The proper way to do this is to either manually add all individual bytes manually, or memcpy the struct into memory. As we want to deallocate the memory before returning, and because pSysMem is a const void*, we keep a unique_ptr to the data and just pass pSysMem a raw pointer to the data.
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/Device.cpp')
0 files changed, 0 insertions, 0 deletions