u/brubsabrubs

compilation time conditional imports... somehow?

Context: currently I'm working on a game that uses dear imgui for all of the debug UI. I'm looking for an easy way to make these procedures only available at DEBUG builds.

I know that I can go through each procedure that uses imgui and define them conditionally with when ODIN_DEBUG, and do the same for the places that call them. That is actually what I'm doing already. However, it's hard to find the places that I need to do this. What if I miss a spot?

You know what would be easier? Being able to wrap the import statements themselves in these when blocks. This way I can easily grep my codebase for imports of this specific module, wrap them all with a when ODIN_DEBUG statement, and then have my compiler scream in case i use them anywhere inside a production build.

Any easy way to achieve this?

reddit.com
u/brubsabrubs — 4 days ago
▲ 4 r/kde

I always have at least 3 audio output devices available on my computer, sometimes it goes up to 6. When that happens, it's a bit confusing to click on the audio volume widget and quickly spot the currently active device. It would be nice to have a "master slider", something that can control the currently active device, regardless of which one it is.

something that shows on top of the other sliders, maybe where i marked in this screenshot?

https://preview.redd.it/b8l5f7ys3kzg1.png?width=512&format=png&auto=webp&s=369a292a6f08d84cb55f79b3c3246aedc03899b2

reddit.com
u/brubsabrubs — 7 days ago