TeamRizu / OutFox

The Bug Reporting Repository for OutFox LTS 0.4, Alpha V and Steam Early Access Builds
https://projectoutfox.com
Apache License 2.0
178 stars 3 forks source link

[BUG] OutFox uses windows style CRLF line breaks in Preferences.ini even on Linux systems #724

Open julianandrews opened 4 months ago

julianandrews commented 4 months ago

Is there an existing issue for this?

Operating System

Linux, Mac likely also affected

CPU

No response

GPU

No response

Storage

No response

Game Version

5.0.0-042

Game Mode

dance

Theme

No response

Describe the problem

When writing out Preferences.ini OutFox consistently uses windows-style CRLF line breaks. I'm guessing this problem also affects Macs, and likely affects any other config files written by OutFox.

While the CRLF line breaks don't outright break anything, they do make it a little obnoxious to use automated tools to manage config files since changes written with standard line breaks will get overwritten the next time OutFox runs.

It's also just a bit of a weird surprise to have a file with CRLF line breaks on a Linux system - it makes me feel like I'm back in the 90s!

I'm guessing this is a pretty simple fix. If the project were open source I'd be looking to put together a PR rather than reporting a bug.

Describe what should happen

OutFox should use the standard line breaks for whatever platform it's running on (CRLF on windows, and LF on Mac/Linux).

Relevant Log output

No response

Jousway commented 4 months ago

sadly the whole game (stepmania) is written to do \r\n and replacing that to just \n is gonna be quite annoying, we will prob do it but its not a simple replace sadly.

bonimy commented 1 month ago

I'm guessing std::stringstream is the approach, but the challenge will be that there are possibly thousands of strings that would need to deal with this?