Joshua-Ashton / dxup

A d3d9 and d3d10 to d3d11 translation layer.
zlib License
259 stars 26 forks source link

[build] Fix winelib build (patrially) #24

Closed pchome closed 5 years ago

pchome commented 5 years ago

Another part I'm not sure about: winelib.patch.txt

And final part: /usr/include/wine/windows/d3d9.h (https://github.com/wine-staging/wine-patched/blob/master/include/d3d9.h#L1620)

-STDMETHOD(GetAdapterDisplayModeEx)(THIS_ UINT adapter_idx, D3DDISPLAYMODEEX *mode, D3DDISPLAYROTATION *rotation);
+STDMETHOD(GetAdapterDisplayModeEx)(THIS_ UINT adapter_idx, D3DDISPLAYMODEEX *mode, D3DDISPLAYROTATION *rotation) PURE;

P.S. I don't know what is this, and how it should work, but it compiles and produce output. I like outputs. :frog:

pchome commented 5 years ago

Outputs for Valley Benchmark 1.0 (patched https://github.com/Joshua-Ashton/dxup/commit/01016fe2b1e46f3fc3660d8003da630897d00e71): log_d3d9.txt Valley_d3d11.log Valley_dxgi.log

Joshua-Ashton commented 5 years ago

Thank you for your work @pchome :heart: :frog:. You saved me a lot of hastle.

Is this ready to merge yet? :smiley:

Joshua-Ashton commented 5 years ago

I noticed a few possible errors in your patch:

You replaced snprintf(buffer2, 1024, "[%s] %s\n", prefix, buffer); with snprintf(buffer2, 1028, "[%s] %s\n", prefix, buffer); Why? This could cause an overflow as buffer2 is only 1024 bytes in size.

You commented out `#subdir('d3d10_1')

subdir('dxgi')`

I assume this is a leftover from testing.

Other than that it looks good. :+1: I'll see if it breaks Windows builds tomorrow. :stuck_out_tongue:

pchome commented 5 years ago

If this don't break your builds -- you can merge.

Why? This could cause an overflow as buffer2 is only 1024 bytes in size.

Please ignore this one, it's GCC warning and proposal.

I assume this is a leftover from testing.

Ignore this one too, as well as -fpermissive and -Wreorder parts.

Joshua-Ashton commented 5 years ago

Alrighty, I'll check it out tomorrow. I'll go back through and fix any warnings spewed in Linux builds myself later on.

pchome commented 5 years ago

I'll redo this PR to resolve conflicts.