Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 19 May 2000
Offline Last Active Jan 07 2015 07:10 PM

Posts I've Made

In Topic: Revision control for games

14 August 2014 - 07:05 AM

Just speaking out loud here, not from experience. For reference where I work we use SVN for all of our projects, with the exception of kernel/u-boot work which is kept in git and patches stored in SVN.


I am a programmer, my wife is a graphic designer. I love revision control. She hates it.


What about having a system that autonomously monitors the live drop box folder. As files are changed / added / removed it keeps a secondary git repo ( separate from your code repo ) up to date. With the right tools on the server you can download a snapshot of all assets a any point in time without having to clone a terabyte of history, but the history is still ( mostly ) there. You won't get perfect history ( for example if a file is renamed ) and you run the possibility that a file is updated twice before your local copy is synced so you miss the intermediate. Maybe drop box has API's that would give you this information.



In Topic: I don't get c++11.

19 February 2014 - 09:04 PM

c++11 to me was largely a quality of life improvement. Some other features that haven't been mentioned:


Non-static data member initialization - Being able to declare the default value of a member variable at declaration ( where it should have been ) instead of some constructor somewhere else. ( My personal favorite )

Delegating / Inheriting constructors - How many times have you had to write an init() because of multiple constructors.

constexpr - Kind of like a type safe macro's.



In Topic: Change network adapter settings Win32 API?

01 January 2014 - 08:38 PM

I had to implement configuration of network interfaces for a remotely managed system. I found shelling to netsh to be the most complete and reliable way to do this. The win32 API is incomplete, hacking the registry is a gambit, and WMI has quirks ( for example, if an interface did not have a cable plugged in WMI could not change its settings ).



In Topic: Rendering text

23 October 2013 - 05:29 AM

I've based my font rendering on this: http://code.google.com/p/freetype-gl/



In Topic: Getting raw keyboard input in console programming using Linux

18 October 2013 - 06:29 AM

Are you just trying to read from the device raw? You need to read events:


Quick hack cut+paste from another project:

        int fd = ::open( "/dev/input/event0", O_RDONLY | O_CLOEXEC );
        if( -1 == fd )
            return false;
        char name[ 32 ];
        if( -1 == ioctl( fd, EVIOCGNAME( sizeof( name )), name ))
            return false;
        // Grab input
        if( -1 == ioctl( fd, EVIOCGRAB, (void*)1 ))
            printf( "Failed to grab input %s: (%i) %m", name, errno );
            return false;

	struct input_event ev;
	memset( &ev, 0, sizeof( ev ));
	if( -1 == read( m_input, &ev, sizeof( ev )) )
		printf( "read() failed: (%i) %m", errno );
	if( ev.type != EV_KEY ) return;
	if( ev.value != 0 ) return;

	if( ev.code == KEY_F11 )
	else if( ev.code == KEY_F12 )
		display().show_osd( !display().osd_visible );

You will want to enable non blocking, then handle the EAGAIN when the read fails.