diff options
author | Darkvater <darkvater@openttd.org> | 2007-02-23 12:56:10 +0000 |
---|---|---|
committer | Darkvater <darkvater@openttd.org> | 2007-02-23 12:56:10 +0000 |
commit | 1bbbbeeef19727639d80c9bfe760248d50720bc2 (patch) | |
tree | 8281000501fad69bd62fdfaf32ebf1cf2d050a9a /src/music_gui.cpp | |
parent | 6d199fcdb75e40ffdde0e612c301f2e74b901678 (diff) | |
download | openttd-1bbbbeeef19727639d80c9bfe760248d50720bc2.tar.xz |
(svn r8860) -Cleanup: some style changes, proper #endif comments, variable initialisation, WINCE ifdef and a vsprintf to vsnprintf change.
Diffstat (limited to 'src/music_gui.cpp')
-rw-r--r-- | src/music_gui.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/music_gui.cpp b/src/music_gui.cpp index 49d7b7ef8..143f252d9 100644 --- a/src/music_gui.cpp +++ b/src/music_gui.cpp @@ -422,12 +422,11 @@ static void MusicWindowWndProc(Window *w, WindowEvent *e) case 5: // start playing msf.playing = true; break; - case 6:{ // volume sliders - byte *vol,new_vol; + case 6: { // volume sliders + byte *vol, new_vol; int x = e->we.click.pt.x - 88; - if (x < 0) - return; + if (x < 0) return; vol = &msf.music_vol; if (x >= 106) { @@ -435,7 +434,7 @@ static void MusicWindowWndProc(Window *w, WindowEvent *e) x -= 106; } - new_vol = min(max(x-21,0)*2,127); + new_vol = min(max(x - 21, 0) * 2, 127); if (new_vol != *vol) { *vol = new_vol; if (vol == &msf.music_vol) |