Skip to content
This repository has been archived by the owner on Oct 30, 2019. It is now read-only.

Commit

Permalink
Merge pull request #206 from 3vi1/monogame-sdl2
Browse files Browse the repository at this point in the history
SDL/* Comment Cleanup
  • Loading branch information
flibitijibibo committed Apr 24, 2014
2 parents 8d5d7ef + 8ff2f5f commit 300d965
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 16 deletions.
1 change: 0 additions & 1 deletion MonoGame.Framework/Media/MediaPlayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,6 @@ private static void NextSong(int direction)

private static void PlaySong(Song song)
{
song.SetEventHandler(OnSongFinishedPlaying);
song.Volume = IsMuted ? 0.0f : Volume;
song.Play();
State = MediaState.Playing;
Expand Down
6 changes: 4 additions & 2 deletions MonoGame.Framework/SDL2/Input/SDL2_GamePad.cs
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,8 @@ private static void INTERNAL_AutoConfig()
osConfigFile += Environment.GetEnvironmentVariable("HOME");
if (osConfigFile.Length == 0)
{
osConfigFile += "MonoGameJoystick.cfg"; // Oh well.
// Home wasn't found, so just try file in current directory.
osConfigFile = "MonoGameJoystick.cfg";
}
else
{
Expand All @@ -339,7 +340,8 @@ private static void INTERNAL_AutoConfig()
osConfigFile += Environment.GetEnvironmentVariable("HOME");
if (osConfigFile.Length == 0)
{
osConfigFile += "MonoGameJoystick.cfg"; // Oh well.
// Home wasn't found, so just try file in current directory.
osConfigFile = "MonoGameJoystick.cfg";
}
else
{
Expand Down
8 changes: 0 additions & 8 deletions MonoGame.Framework/SDL2/Media/Song.cs
Original file line number Diff line number Diff line change
Expand Up @@ -229,14 +229,6 @@ internal void Stop()

#region Internal Event Handler Methods

/// <summary>
/// Set the event handler for "Finished Playing". Done this way to prevent multiple bindings.
/// </summary>
internal void SetEventHandler(FinishedPlayingHandler handler)
{
// No-op
}

internal void OnFinishedPlaying()
{
MediaPlayer.OnSongFinishedPlaying(null, null);
Expand Down
6 changes: 3 additions & 3 deletions MonoGame.Framework/SDL2/Media/Video.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ internal static string Normalize(string FileName)
return FileName;
}

// Check the file extension
// Valid video asset names should not already have an extension,
if (!string.IsNullOrEmpty(Path.GetExtension(FileName)))
{
return null;
Expand All @@ -170,7 +170,7 @@ internal static string Normalize(string FileName)
return FileName + ".ogg";
}

return null;
return null; // File not found with supported extension.
}

#endregion
Expand All @@ -187,7 +187,7 @@ internal void Initialize()
// Initialize the decoder.
theoraDecoder = TheoraPlay.THEORAPLAY_startDecodeFile(
FileName,
150, // Arbitrarily 5 seconds in a 30fps movie.
150, // Max frames to buffer. Arbitrarily set 5 seconds, assuming 30fps.
#if VIDEOPLAYER_OPENGL
TheoraPlay.THEORAPLAY_VideoFormat.THEORAPLAY_VIDFMT_IYUV
#else
Expand Down
2 changes: 0 additions & 2 deletions MonoGame.Framework/SDL2/SDL2_GameWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -401,8 +401,6 @@ internal void INTERNAL_RunLoop()
#endif
while (SDL.SDL_PollEvent(out evt) == 1)
{
// TODO: All events...

// Keyboard
if (evt.type == SDL.SDL_EventType.SDL_KEYDOWN)
{
Expand Down

0 comments on commit 300d965

Please sign in to comment.