Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix line ending bug for downloaded gecko codes #2539

Merged
merged 1 commit into from Jun 7, 2015

Conversation

mimimi085181
Copy link
Contributor

Gecko codes .txt files that contain windows style line endings result in mixed line endings for the generated .ini file(\r\r\n) when using Windows. This PR removes some single \r at the end of lines. The generated file uses the line ending style from the running OS, so in case of Windows, it's generating files with \r\n line endings.

Tested on Windows, some confirmation that this generates proper unix line endings on linux would be nice. Test example was Wii Sports Resort PAL.

@JosJuice
Copy link
Member

JosJuice commented Jun 6, 2015

LGTM

@@ -192,6 +192,9 @@ void CodeConfigPanel::DownloadCodes(wxCommandEvent&)

while ((std::getline(ss, line).good()))
{
// Remove \r at the end of the line for files using windows line endings, std::getline only removes \n
line = StripSpaces(line);

// empty line
if (0 == line.size() || line == "\r" || line == "\n") // \r\n checks might not be needed

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

// empty line
if (0 == line.size() || line == "\r" || line == "\n") // \r\n checks might not be needed
if (0 == line.size())

This comment was marked as off-topic.

@mimimi085181
Copy link
Contributor Author

Updated: Removed the unnecessary check for lines consisting only of \r, which can't happen anymore.

@RisingFog
Copy link
Member

@dolphin-emu-bot rebuild

@dolphin-emu-bot
Copy link
Contributor

FifoCI detected that this change impacts graphical rendering. Here are the behavior differences detected by the system:

  • ea-vp6 on ogl-lin-nv: diff
  • ed-lighting on ogl-lin-nv: diff
  • fortune-street-white-box on ogl-lin-nv: diff
  • megaman-heat on ogl-lin-nv: diff
  • melee-lighting on ogl-lin-nv: diff
  • simpsons-tev on ogl-lin-nv: diff
  • smg2-fog on ogl-lin-nv: diff
  • ssbm-pointsize on ogl-lin-nv: diff

automated-fifoci-reporter

@RisingFog
Copy link
Member

LGTM

comex added a commit that referenced this pull request Jun 7, 2015
Fix line ending bug for downloaded gecko codes
@comex comex merged commit 9f2d684 into dolphin-emu:master Jun 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
7 participants