Skip to content

Commit ab632b8

Browse files
author
Markus Jung
committed
Fix formatting issues
1 parent eb2ca88 commit ab632b8

File tree

2 files changed

+20
-18
lines changed

2 files changed

+20
-18
lines changed

slides/cpp-code/sdl_event.cpp

+17-15
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
while(1){
2-
SDL_Event event;
3-
while(SDL_PollEvent(&event)) { /* Loop until there are no events left on the queue */
4-
switch(event.type) { /* Process the appropriate event type */
5-
case SDL_KEYDOWN: /* Handle a KEYDOWN event */
6-
printf("Oh! Key press\n");
7-
break;
8-
case SDL_MOUSEMOTION:
9-
.
10-
.
11-
.
12-
default: /* Report an unhandled event */
13-
printf("I don't know what this event is!\n");
14-
}
2+
SDL_Event event;
3+
/* Loop until there are no events left on the queue */
4+
while(SDL_PollEvent(&event)) {
5+
switch(event.type) { /* Process the appropriate event type */
6+
case SDL_KEYDOWN: /* Handle a KEYDOWN event */
7+
printf("Oh! Key press\n");
8+
break;
9+
case SDL_MOUSEMOTION:
10+
.
11+
.
12+
.
13+
default: /* Report an unhandled event */
14+
printf("I don't know what this event is!\n");
15+
}
1516
}
16-
// do some other stuff here -- draw your app, play your music, perform other operations...
17-
}
17+
// do some other stuff here -- draw your app,
18+
// play your music, perform other operations...
19+
}

slides/sdl.tex

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ \subsection{Was ist das?}
1919

2020
\subsection{Grundkonzepte}
2121
\begin{frame}[fragile]{Surfaces}
22-
\verb|SDL_Surface| repräsentiert eine Oberfläche, auf die gezeichnet werden kann:
22+
\texttt{SDL\_Surface} repräsentiert eine Oberfläche, auf die gezeichnet werden kann:
2323
\begin{itemize}
2424
\item der Bildschirm
2525
\item eine Textur bzw. ein Bild
@@ -47,5 +47,5 @@ \subsection{Grundkonzepte}
4747
\end{frame}
4848

4949
\begin{frame}[fragile]{Events}
50-
\lstinputlisting{cpp-code/sdl_event.cpp}
51-
\end{frame}
50+
\lstinputlisting[language=C++, basicstyle=\footnotesize, numbers=left, numberstyle=\tiny\color{gray}, tabsize=2]{cpp-code/sdl_event.cpp}
51+
\end{frame}

0 commit comments

Comments
 (0)