Click here to Skip to main content
15,901,035 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Are you sure Azure? Pin
Nagy Vilmos4-Dec-21 0:23
professionalNagy Vilmos4-Dec-21 0:23 
GeneralCCC 03-12-2021 Pin
pkfox2-Dec-21 21:43
professionalpkfox2-Dec-21 21:43 
GeneralRe: CCC 03-12-2021 Pin
OriginalGriff2-Dec-21 22:03
mveOriginalGriff2-Dec-21 22:03 
GeneralRe: CCC 03-12-2021 Pin
pkfox2-Dec-21 22:20
professionalpkfox2-Dec-21 22:20 
GeneralRe: CCC 03-12-2021 Pin
OriginalGriff2-Dec-21 23:02
mveOriginalGriff2-Dec-21 23:02 
GeneralRe: CCC 03-12-2021 Pin
pkfox2-Dec-21 23:48
professionalpkfox2-Dec-21 23:48 
GeneralRe: CCC 03-12-2021 Pin
englebart6-Dec-21 8:26
professionalenglebart6-Dec-21 8:26 
GeneralThe house that Jack built Pin
honey the codewitch2-Dec-21 15:58
mvahoney the codewitch2-Dec-21 15:58 
I've been making an NES emulator for the ESP32.

I got it coded, but it's crashing into a reboot loop, and not easily debuggable on that platform.

So I've made a GFX driver for DirectX under Windows.

But in using it I discovered that my header-only library cannot be header-only. So I had to spend hours going through my rather lengthy library making CPP files. This was especially nasty where the truetype was concerned.

So I fire up the driver. It crashes on start. Turns out just getting the dimensions of the drawing surface (m_psurface->GetSize()) was causing my app to crash. Bizarre.

So I dig and I dig, and I find out that GCC is using a different calling convention to return pointers to structures from static member functions than Microsoft does. They're both STDCALL declared but GCC interprets an ambiguous rule about returning structs differently than MS. MS later seems to have clarified by indicating that static members will NOT return pointers in a register. GCC does.

So now, I had to patch a system header file (d2d1.h) to explicitly return the struct pointer from the offending methods.


Anyway, now that my GFX library is now at another major revision because of adding the CPP files to it, but at least I've got it drawing to a window.

What's cool is I can run the same code on Windows as I can on the ESP32 now.

This took me most of the day, and I have no idea how I'm going to redistribute this given the modified system header file.**

**no I can't modify a second file. The interface definitions i had to modify are used all over directX, and other headers include this one, so I was stuck.

Anyway, this was probably the most hardcore coding session I've had in awhile, even though the driver itself is about 100 lines (mostly empty)
Real programmers use butterflies

GeneralRe: The house that Jack built Pin
englebart2-Dec-21 16:42
professionalenglebart2-Dec-21 16:42 
GeneralRe: The house that Jack built Pin
honey the codewitch2-Dec-21 18:07
mvahoney the codewitch2-Dec-21 18:07 
GeneralRe: The house that Jack built Pin
ElectronProgrammer3-Dec-21 1:23
ElectronProgrammer3-Dec-21 1:23 
GeneralRe: The house that Jack built Pin
honey the codewitch3-Dec-21 2:15
mvahoney the codewitch3-Dec-21 2:15 
GeneralRe: The house that Jack built Pin
BernardIE53173-Dec-21 10:54
BernardIE53173-Dec-21 10:54 
GeneralRe: The house that Jack built Pin
honey the codewitch3-Dec-21 11:15
mvahoney the codewitch3-Dec-21 11:15 
JokeTis the season PinPopular
Mike Hankey2-Dec-21 8:35
mveMike Hankey2-Dec-21 8:35 
GeneralRe: Tis the season Pin
pkfox2-Dec-21 22:32
professionalpkfox2-Dec-21 22:32 
GeneralRe: Tis the season Pin
oofalladeez34313-Dec-21 15:56
professionaloofalladeez34313-Dec-21 15:56 
GeneralEmbarassment at work today PinPopular
Gary Wheeler2-Dec-21 6:20
Gary Wheeler2-Dec-21 6:20 
GeneralRe: Embarassment at work today Pin
jeron12-Dec-21 6:24
jeron12-Dec-21 6:24 
GeneralRe: Embarassment at work today Pin
David O'Neil2-Dec-21 6:29
professionalDavid O'Neil2-Dec-21 6:29 
GeneralRe: Embarassment at work today Pin
PIEBALDconsult2-Dec-21 6:34
mvePIEBALDconsult2-Dec-21 6:34 
GeneralRe: Embarassment at work today Pin
Gary Wheeler2-Dec-21 6:40
Gary Wheeler2-Dec-21 6:40 
GeneralRe: Embarassment at work today Pin
David O'Neil2-Dec-21 7:43
professionalDavid O'Neil2-Dec-21 7:43 
GeneralRe: Embarassment at work today Pin
PIEBALDconsult2-Dec-21 6:40
mvePIEBALDconsult2-Dec-21 6:40 
GeneralRe: Embarassment at work today Pin
Gary Wheeler2-Dec-21 6:42
Gary Wheeler2-Dec-21 6:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Straw Poll

Were you affected by the geomagnetic storms this past weekend?
Communication disruptions, electrified pipes, random unexplained blue-screens in Windows - the list of effects is terrifying.
  Results   499 votes