Skip to content

Commit cdac5af

Browse files
updated outdated code example
1 parent 29ce839 commit cdac5af

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

README.md

+8-4
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,20 @@ You can view the [documentation](https://timetravelpenguin.github.io/MupenSharp/
3232
In order to read a .m64 file, you can do the following:
3333

3434
```cs
35+
using MupenSharp.Models;
36+
using MupenSharp.FileParsing;
37+
using MupenSharp.Enums;
38+
3539
const string file = "C://path/to/file.m64";
36-
M64 m64 = M64Parser.Parse(file);
40+
M64 m64 = MupenV3Parser.Parse(file);
3741

3842
Console.WriteLine($"Author(s): {m64.Author}");
39-
Console.WriteLine($"ROM name: {m64.NameOfRom}");
43+
Console.WriteLine($"ROM name: {m64.RomName}");
4044

4145
var frameCount = 1;
42-
foreach (var inputFrame in m64.Inputs)
46+
foreach (var inputFrame in m64.GetControllerInputs(Controller.ControllerOne))
4347
{
44-
Console.WriteLine($"Frame {frameCount++}:\t{inputFrame}");
48+
Console.WriteLine($"Frame {frameCount++}:\t{inputFrame}");
4549
}
4650
```
4751

0 commit comments

Comments
 (0)