laamaa / m8c

Cross-platform M8 tracker headless client
Other
419 stars 87 forks source link

Able to render m8 background color to SDL canvas #101

Closed RyanDam closed 1 year ago

RyanDam commented 1 year ago

Firstly, thank you for developing M8C, this is awesome.

This feature is mostly for aesthetic reason. Some screen ratio is different than the ratio of the M8, this causes the black border which is annoying (at least for me)

This PR provides option to render M8 background color to the canvas of SDL to prevent black border. By default, this feature is off so existing user is not affected. To turn it on, set canvas_color=true in the ini file.

compare

Note: I'm not familiar with SDL so if something is not right, please guide me in the right direction.

laamaa commented 1 year ago

I think this is a good idea and probably should be just always on. Would it be possible to make it so that there's no config setting and it's just always enabled? That way there wouldn't be a need to change the initialize_sdl function and the other extra ifs

RyanDam commented 1 year ago

I think this is a good idea and probably should be just always on. Would it be possible to make it so that there's no config setting and it's just always enabled? That way there wouldn't be a need to change the initialize_sdl function and the other extra ifs

Thanks for the comment. I was not sure at first whether or not somebody not like this feature. But I also think it is more suitable to make it default. I cleaned up the code, please have a look.

laamaa commented 1 year ago

Merged, thank you!