Skip to content

Commit

Permalink
Merge pull request #1 from pleonex/master
Browse files Browse the repository at this point in the history
Sync with master
  • Loading branch information
ccawley2011 committed Jul 10, 2016
2 parents c2e71ee + 1fa7288 commit 75fc829
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .appveyor.yml
Expand Up @@ -7,3 +7,5 @@ image:

build_script:
- cmd: compile.bat Release x86

test: off
9 changes: 5 additions & 4 deletions Tinke/Sistema.cs
Expand Up @@ -1576,7 +1576,11 @@ private void btnSaveROM_Click(object sender, EventArgs e)
Nitro.NDS.Write_Files(files, accion.ROMFile, accion.Root, accion.SortedIDs);
currPos += (uint)new FileInfo(files).Length;

// Escribimos cabecera
// Update the ROM size values of the header
header.ROMsize = currPos;
header.tamaño = (uint)Math.Ceiling(Math.Log(currPos, 2));
header.tamaño = (uint)Math.Pow(2, header.tamaño);

// Get Header CRC
string tempHeader = Path.GetTempFileName();
Nitro.NDS.EscribirCabecera(tempHeader, header, accion.ROMFile);
Expand All @@ -1585,9 +1589,6 @@ private void btnSaveROM_Click(object sender, EventArgs e)
brHeader.Close();
File.Delete(tempHeader);

header.ROMsize = currPos;
header.tamaño = (uint)Math.Ceiling(Math.Log(currPos, 2));
header.tamaño = (uint)Math.Pow(2, header.tamaño);
// Write header
string header_file = Path.GetTempFileName();
Nitro.NDS.EscribirCabecera(header_file, header, accion.ROMFile);
Expand Down

0 comments on commit 75fc829

Please sign in to comment.