Logicalshift / flo_draw

2D rendering libraries for Rust and FlowBetween
Apache License 2.0
101 stars 6 forks source link

feat: multicard support for linux offscren render #11

Closed Brayan-724 closed 5 months ago

Brayan-724 commented 5 months ago

Add support for multiple video cards through an environment variable FLO_CARD that can be set to the number of the card.

Example:

# Run with /dev/dri/card1
FLO_CARD=1 cargo run

This fixes a error on my machine, I don't have card0, it begins from card1. So, when I run some code without this changes it tries to get card0 by default and It doesn't work.

Logicalshift commented 5 months ago

:+1: This seems like a sensible change to me.

I think an improvement would be to scan for devices if card0 is missing but the ability to override the default choice makes sense anyway if there are multiple options.

I didn't think this was something that could actually happen, and haven't been able to find out why yet which I think I need to know before trying to scan for the correct device file (Google has a whole bunch of people with a similar issue with other software but I can't see any explanation of how this happens)

Brayan-724 commented 5 months ago

@Logicalshift In my case, it happened when I burn out my gpu :+1: That's all